/*!
 * site.css — public site, cabinet and shared components.
 * Theme «Sea of Erenor»: deep sea-teal night, parchment and bronze-gold. Dark by default, light = «parchment».
 * CSP-safe: no inline styles in the markup — every component lives here. Class reference: templates/README.md
 *
 *  1. Tokens            6. Components (btn, card, badge, alert, form, table, tabs, pagination, stats, steps,
 *  2. Base                 timeline, accordion, empty, kv, subnav, prose, ornament)
 *  3. Layout            7. Pages (home, about, rankings, files, news, rules, roadmap, errors)
 *  4. Header & nav      8. Cabinet / account pages (shared with the cabinet module)
 *  5. Footer            9. Utilities, motion, print
 */

/* ============================== 1. Tokens ============================== */
:root {
  color-scheme: dark;

  /* palette */
  --abyss-950: #031013;
  --abyss-900: #05171b;
  --abyss-850: #082027;
  --abyss-800: #0c2a31;
  --abyss-700: #12363e;
  --abyss-600: #1b4a53;
  --teal-200: #b4ece2;
  --teal-300: #7fd6c8;
  --teal-400: #4cbfad;
  --teal-500: #2c9c8c;
  --teal-700: #13574f;
  --parch-50: #fbf5e6;
  --parch-100: #f2e7cc;
  --parch-300: #dccaa3;
  --parch-500: #a99f87;
  --bronze-200: #f7e2b0;
  --bronze-300: #efcd85;
  --bronze-400: #ddb15f;
  --bronze-500: #c8963e;
  --bronze-600: #a17328;
  --bronze-700: #6c4b16;
  --coral-400: #f08467;
  --amber-400: #f2aa45;
  --sky-400: #82b8ff;

  /* semantic (dark) */
  --bg: var(--abyss-900);
  --bg-alt: var(--abyss-850);
  --surface: var(--abyss-800);
  --surface-2: var(--abyss-700);
  --surface-glass: rgba(8, 32, 39, .74);
  --border: rgba(221, 177, 95, .15);
  --border-strong: rgba(221, 177, 95, .34);
  --text: #e3dcc8;
  --text-strong: var(--parch-50);
  --text-muted: #a6a48f;
  --heading: #f6ecd2;
  --accent: var(--bronze-400);
  --accent-strong: var(--bronze-300);
  --link: var(--teal-300);
  --link-hover: var(--bronze-300);
  --on-accent: #1c1304;
  --success: var(--teal-400);
  --danger: var(--coral-400);
  --warning: var(--amber-400);
  --info: var(--sky-400);
  --focus: #6fe3d2;
  --grain: rgba(127, 214, 200, .028);
  --shadow: 0 16px 38px rgba(0, 0, 0, .42);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .3);
  --bronze-grad: linear-gradient(180deg, #f8dfa3 0%, #dcab52 52%, #a87628 100%);
  --bronze-text: linear-gradient(180deg, #fbe8bd 8%, #e3b866 52%, #b58331 92%);
  --sea-grad: linear-gradient(180deg, #4cbfad 0%, #2c9c8c 100%);

  /* aliases of the Desert PW token names (module stylesheets ported from there keep working) */
  --gold-300: var(--bronze-300);
  --gold-400: var(--bronze-400);
  --gold-500: var(--bronze-500);
  --gold-600: var(--bronze-600);
  --gold-700: var(--bronze-700);
  --gold-grad: var(--bronze-grad);
  --gold-text: var(--bronze-text);
  --turq-400: var(--teal-400);
  --carnelian-400: var(--coral-400);
  --lapis-400: var(--sky-400);

  /* always-dark chrome (top bar, header, hero, footer) */
  --chrome-bg: #031114;
  --chrome-text: #e3dcc8;
  --chrome-muted: #9aa392;
  --chrome-border: rgba(221, 177, 95, .17);

  /* type */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, "DejaVu Serif", serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;

  /* metrics */
  --container: 1180px;
  --gutter: 16px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 68px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #efe5cd;
  --bg-alt: #e7dabb;
  --surface: #fbf6e9;
  --surface-2: #f2e8d0;
  --surface-glass: rgba(251, 246, 233, .88);
  --border: rgba(108, 75, 22, .2);
  --border-strong: rgba(108, 75, 22, .4);
  --text: #2a2518;
  --text-strong: #1a160c;
  --text-muted: #5d5640;
  --heading: #1b170b;
  --accent: #8a5c12;
  --accent-strong: #6f480b;
  --link: #0e5d55;
  --link-hover: #8a5c12;
  --success: #0f6d61;
  --danger: #b23b22;
  --warning: #965700;
  --info: #1d4f9e;
  --focus: #0e5d55;
  --grain: rgba(108, 75, 22, .04);
  --shadow: 0 12px 28px rgba(70, 50, 14, .16);
  --shadow-sm: 0 3px 10px rgba(70, 50, 14, .12);
  --bronze-text: linear-gradient(180deg, #a3701b 10%, #85560c 60%, #6a430a 100%);
}

/* ============================== 2. Base ============================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 16px/1.6 var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 88% -10%, rgba(76, 191, 173, .08), transparent 62%),
    radial-gradient(800px 420px at -10% 30%, rgba(221, 177, 95, .045), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
h1, h2, h3, h4 {
  margin: 0 0 .6em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  color: var(--heading);
  letter-spacing: .005em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
code, kbd { font-family: var(--font-mono); font-size: .92em; }
code { padding: .1em .38em; border-radius: 6px; background: var(--surface-2); color: var(--text-strong); overflow-wrap: anywhere; }
strong { color: var(--text-strong); }
::selection { background: rgba(76, 191, 173, .35); color: var(--text-strong); }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: .6rem 1rem; border-radius: var(--radius-sm);
  background: var(--bronze-400); color: var(--on-accent); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

/* ============================== 3. Layout ============================== */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: calc(760px + 2 * var(--gutter)); }
.container-tight { max-width: calc(480px + 2 * var(--gutter)); }

.site-main { flex: 1 0 auto; outline: none; }
.section { padding: clamp(40px, 6vw, 84px) 0; }
.section-alt {
  background:
    linear-gradient(90deg, var(--grain) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(0deg, var(--grain) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--text-muted); max-width: 62ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px;
  color: var(--accent); font: 700 .78rem/1.2 var(--font-body); letter-spacing: .18em; text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 12px; height: 12px; flex: none; background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.stack > * + * { margin-top: 16px; }
.cluster { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
ol.cluster, ul.cluster { list-style: none; margin: 0 0 1em; padding: 0; }
ol.cluster > li, ul.cluster > li { margin: 0; }
/* grid/flex children may shrink below their content (long words, tables) — no page overflow */
.grid > *, .split > *, .hero-grid > *, .with-sidebar > *, .rules-layout > *, .news-row > *, .card-grid > *, .world > *, .faction-grid > * { min-width: 0; }
.split { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; }
  .split-rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
}

/* bronze ornament line with a compass star in the middle (frieze = Desert PW name, kept for templates) */
.ornament, .frieze {
  height: 18px; border: 0; margin: 0;
  background: url("../img/ornament.svg") no-repeat center / auto 18px,
    linear-gradient(90deg, transparent, rgba(221, 177, 95, .45) 18%, rgba(221, 177, 95, .45) 82%, transparent) center / 100% 1px no-repeat;
  opacity: .85;
}

/* ============================== 4. Header & nav ============================== */
.topbar { background: var(--chrome-bg); color: var(--chrome-muted); border-bottom: 1px solid var(--chrome-border); font-size: .85rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.topbar-links { display: flex; align-items: center; gap: 6px; }
.topbar a { color: var(--chrome-text); text-decoration: none; }
.topbar a:hover { color: var(--bronze-300); }

/* language switcher (top bar): RU / UA / EN segmented pill */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  border: 1px solid var(--chrome-border); border-radius: 999px; background: rgba(255, 255, 255, .03);
}
.topbar .lang-link {
  display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 7px; border-radius: 999px;
  color: var(--chrome-muted); font: 700 .72rem/1 var(--font-body); letter-spacing: .08em;
}
.topbar .lang-link:hover { color: var(--bronze-300); background: rgba(221, 177, 95, .1); }
.topbar .lang-link[aria-current="true"] { color: var(--on-accent); background: var(--bronze-grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.topbar-register { white-space: nowrap; }

.status { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #7a7f78; box-shadow: 0 0 0 3px rgba(122, 127, 120, .18); flex: none; }
.status-online .status-dot { background: var(--teal-400); box-shadow: 0 0 0 3px rgba(76, 191, 173, .2), 0 0 12px rgba(76, 191, 173, .75); }
.status-offline .status-dot { background: var(--coral-400); box-shadow: 0 0 0 3px rgba(240, 132, 103, .18); }
.status-label { color: var(--chrome-text); font-weight: 600; }
.status-sep { opacity: .45; }
.status-players b { color: var(--bronze-300); font-variant-numeric: tabular-nums; }

.theme-toggle {
  display: none; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--chrome-border); border-radius: 50%; background: transparent; color: var(--chrome-text); cursor: pointer;
}
.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { color: var(--bronze-300); border-color: rgba(221, 177, 95, .5); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background:
    url("../img/stars.svg") repeat 0 0 / 420px,
    linear-gradient(180deg, rgba(4, 19, 23, .97), rgba(6, 26, 31, .95));
  border-bottom: 1px solid var(--chrome-border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .28);
  color: var(--chrome-text);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex: none; min-width: 0;
  color: var(--parch-50); text-decoration: none; border-radius: 8px;
}
.brand:hover { color: var(--bronze-200); }
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-name {
  font: 700 1.5rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase;
  background: var(--bronze-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
.brand-sub { display: block; margin-top: 3px; font: 600 .62rem/1 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--chrome-muted); }
.nav-toggle {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid var(--chrome-border); border-radius: 12px; background: rgba(255, 255, 255, .03); color: var(--chrome-text); cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }
.nav-open .nav-toggle .icon-menu { display: none; }

.site-nav { display: none; }
.nav-open .site-nav, html:not(.js) .site-nav { display: block; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 4px;
  color: var(--chrome-text); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(221, 177, 95, .08);
}
.nav-link .icon { color: var(--bronze-400); opacity: .9; }
.nav-link:hover { color: var(--bronze-300); }
.nav-link[aria-current="page"] { color: var(--bronze-300); }
.nav-account { display: flex; gap: 10px; padding: 14px 0 18px; }
.nav-account .btn { flex: 1; }
.nav-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 16px 0 6px; }
.nav-lang-label { display: inline-flex; align-items: center; gap: 10px; color: var(--chrome-muted); font-weight: 600; font-size: .92rem; }
.nav-lang-label .icon { color: var(--bronze-400); }
.nav-lang-list { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-lang-link {
  display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px;
  border: 1px solid var(--chrome-border); border-radius: 999px; color: var(--chrome-text); font-weight: 600; font-size: .92rem; text-decoration: none;
}
.nav-lang-link:hover { color: var(--bronze-300); border-color: rgba(221, 177, 95, .5); }
.nav-lang-link[aria-current="true"] { color: var(--on-accent); background: var(--bronze-grad); border-color: transparent; }

@media (max-width: 1139px) {
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: #04161a; border-bottom: 1px solid var(--chrome-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .5); max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  html:not(.js) .site-nav { position: static; box-shadow: none; background: transparent; }
  .site-nav .container { padding-top: 4px; }
  .header-account { display: none; }
}
@media (min-width: 1140px) {
  .nav-toggle { display: none; }
  .site-nav, html:not(.js) .site-nav { display: block; margin-left: auto; }
  .site-nav > .container { padding: 0; max-width: none; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .nav-link { padding: 8px 10px; border: 0; border-radius: 10px; font-size: .95rem; white-space: nowrap; }
  .nav-link .icon { display: none; }
  .nav-link:hover { background: rgba(221, 177, 95, .08); }
  .nav-link[aria-current="page"]::after {
    content: ""; position: absolute; left: 50%; bottom: -1px; width: 10px; height: 10px; transform: translateX(-50%);
    background: var(--bronze-400);
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  }
  .nav-account, .nav-lang { display: none; }
  .header-account { display: flex; flex: none; gap: 8px; margin-left: 8px; }
  .header-account .btn { white-space: nowrap; }
}
@media (min-width: 1140px) and (max-width: 1439px) {
  .header-inner { gap: 12px; }
  .brand-name { font-size: 1.3rem; letter-spacing: .1em; }
  .brand-sub { display: none; }
  .nav-list { gap: 0; }
  .nav-link { padding: 8px 7px; font-size: .9rem; }
  .header-account { margin-left: 4px; }
}
@media (max-width: 599px) { .topbar-register { display: none; } }
@media (max-width: 420px) {
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 1.22rem; letter-spacing: .1em; }
  .brand-sub { display: none; }
  .topbar-links .hide-xs { display: none; }
  .topbar-inner { gap: 8px; }
  .status-players-label { display: none; }
}

/* ============================== 5. Footer ============================== */
.site-footer {
  margin-top: auto; color: var(--chrome-muted); font-size: .95rem;
  background:
    url("../img/stars.svg") repeat 0 0 / 420px,
    linear-gradient(180deg, #05181c, #020c0e);
  border-top: 1px solid var(--chrome-border);
}
.footer-grid { display: grid; gap: 32px; padding: 44px 0 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-brand .brand { margin-bottom: 4px; }
.footer-brand p { margin: 14px 0 0; max-width: 38ch; }
.footer-title { margin: 0 0 12px; color: var(--chrome-text); font: 700 .78rem/1.2 var(--font-body); letter-spacing: .16em; text-transform: uppercase; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: 8px; }
.site-footer a { color: var(--chrome-text); text-decoration: none; }
.site-footer a:hover { color: var(--bronze-300); text-decoration: underline; }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.footer-social a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--chrome-border); border-radius: 999px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  padding: 18px 0 28px; border-top: 1px solid var(--chrome-border); font-size: .82rem;
}

/* ============================== 6. Components ============================== */

/* --- Buttons --- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text-strong);
  --btn-border: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border: 1px solid var(--btn-border); border-radius: 12px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 .98rem/1.2 var(--font-body); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease, filter .15s ease;
  -webkit-user-select: none; user-select: none;
}
.btn:hover { color: var(--btn-fg); border-color: var(--accent); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  --btn-fg: var(--on-accent);
  --btn-border: #f3d58f;
  background: var(--bronze-grad);
  box-shadow: 0 6px 18px rgba(200, 150, 62, .3), inset 0 1px 0 rgba(255, 255, 255, .5);
  text-shadow: 0 1px 0 rgba(255, 240, 205, .35);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(200, 150, 62, .42), inset 0 1px 0 rgba(255, 255, 255, .55); filter: brightness(1.05); }
.btn-sea { --btn-fg: #02201c; --btn-border: #8fe0d2; background: var(--sea-grad); box-shadow: 0 6px 18px rgba(44, 156, 140, .3), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text-strong); }
.site-header .btn-ghost, .hero .btn-ghost, .topbar .btn-ghost, .cta .btn-ghost { --btn-fg: var(--chrome-text); --btn-border: rgba(221, 177, 95, .45); }
.btn-danger { --btn-bg: transparent; --btn-fg: var(--danger); --btn-border: var(--danger); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .88rem; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.4); }
.btn .icon { width: 1.15em; height: 1.15em; }

/* --- Cards --- */
.card {
  position: relative; padding: 24px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(127, 214, 200, .025), transparent 40%), var(--surface);
  box-shadow: var(--shadow-sm);
}
.card > :last-child { margin-bottom: 0; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 1.25rem; }
.card-title .icon { color: var(--accent); }
.card-sub { margin-top: -6px; color: var(--text-muted); font-size: .92rem; }
.card-footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card-link:hover { color: inherit; transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-glass { background: var(--surface-glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* public pages: a thin bronze rim on top of the cards */
.site-main .section .card:not(.card-plain)::before {
  content: ""; position: absolute; inset: -1px -1px auto; height: 2px; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, var(--bronze-500) 22%, var(--bronze-300) 50%, var(--bronze-500) 78%, transparent);
  opacity: .5;
}

/* feature card */
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  color: var(--bronze-300);
  background: radial-gradient(circle at 30% 25%, rgba(239, 205, 133, .22), rgba(76, 191, 173, .06));
  border: 1px solid var(--border-strong);
}
:root[data-theme="light"] .feature-icon { color: var(--accent); }
.feature-icon .icon { width: 28px; height: 28px; }
.feature h3 { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feature p { margin: 0; color: var(--text-muted); }

/* --- Badges --- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor;
  font: 700 .74rem/1.4 var(--font-body); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  color: var(--text-muted); background: transparent;
}
.badge-gold { color: var(--accent); background: rgba(221, 177, 95, .1); }
.badge-success { color: var(--success); background: rgba(76, 191, 173, .08); }
.badge-danger { color: var(--danger); background: rgba(240, 132, 103, .08); }
.badge-warning { color: var(--warning); background: rgba(242, 170, 69, .08); }
.badge-info { color: var(--info); background: rgba(130, 184, 255, .08); }
.badge-muted { color: var(--text-muted); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* --- Alerts / flash --- */
.alert {
  --alert-c: var(--info);
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0 0 16px;
  border: 1px solid var(--alert-c); border-left-width: 4px; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.alert .icon { color: var(--alert-c); margin-top: 2px; }
.alert > div > :last-child { margin-bottom: 0; }
.alert-success { --alert-c: var(--success); }
.alert-error { --alert-c: var(--danger); }
.alert-warning { --alert-c: var(--warning); }
.alert-info { --alert-c: var(--info); }
.flash-stack { padding-top: 20px; }
.flash-stack .alert { box-shadow: var(--shadow-sm); }

/* --- Forms --- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-weight: 700; color: var(--text-strong); font-size: .95rem; }
.field .req { color: var(--danger); margin-left: 2px; }
.input,
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--bg); color: var(--text-strong); font: 400 1rem/1.4 var(--font-body);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); opacity: .75; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal-400); box-shadow: 0 0 0 3px rgba(76, 191, 173, .22); outline: none; }
.field-hint { margin: 0; color: var(--text-muted); font-size: .86rem; }
.field-error { margin: 0; color: var(--danger); font-size: .88rem; font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal-500); flex: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form-actions .link-muted { margin-left: auto; }
.otp-input { font-family: var(--font-mono) !important; font-size: 1.5rem !important; letter-spacing: .5em; text-align: center; }
.honeypot, .hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* --- Tables --- */
.table-wrap {
  width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); -webkit-overflow-scrolling: touch;
}
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th {
  position: sticky; top: 0; background: var(--surface-2); color: var(--text-muted);
  font: 700 .74rem/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(76, 191, 173, .05); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table-compact th, .table-compact td { padding: 8px 12px; }
.table-foot { margin-top: 12px; color: var(--text-muted); font-size: .86rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* --- Tabs / chips --- */
.tabs {
  display: flex; gap: 6px; padding: 6px; margin-bottom: 20px; overflow-x: auto;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); scrollbar-width: thin;
}
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
  color: var(--text-muted); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.tab:hover { color: var(--text-strong); background: var(--surface-2); }
.tab[aria-current="page"], .tab.is-active { color: var(--on-accent); background: var(--bronze-grad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.chip:hover { color: var(--text-strong); border-color: var(--accent); }
.chip[aria-current="page"] { color: var(--on-accent); background: var(--bronze-grad); border-color: transparent; }

/* --- Pagination --- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 32px; }
.pagination a, .pagination span {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 700;
}
.pagination a:hover { border-color: var(--accent); color: var(--text-strong); }
.pagination [aria-current="page"] { background: var(--bronze-grad); color: var(--on-accent); border-color: transparent; }
.pagination .gap { border: 0; min-width: 20px; }

/* --- Stats --- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { position: relative; padding: 18px 18px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stat::after {
  content: ""; position: absolute; right: -16px; bottom: -18px; width: 72px; height: 72px; background: var(--teal-400); opacity: .08;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.stat-value {
  display: block; font: 700 clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem)/1.1 var(--font-display);
  background: var(--bronze-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums;
}
.stat-label { display: block; margin-top: 6px; color: var(--text-muted); font-size: .86rem; font-weight: 600; letter-spacing: .04em; }
.stat-hint { display: block; margin-top: 2px; color: var(--text-muted); font-size: .78rem; opacity: .85; }

/* --- Steps --- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }
.step { position: relative; padding: 22px 20px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); counter-increment: step; }
.step::before {
  content: counter(step); display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px;
  border: 2px solid var(--accent); border-radius: 50%; color: var(--accent); font: 700 1.1rem/1 var(--font-display);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px rgba(221, 177, 95, .35);
}
@media (min-width: 900px) {
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: 42px; right: -23px; width: 24px; height: 2px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 8px); opacity: .6;
  }
}
@media (min-width: 900px) {
  .steps-vertical { grid-template-columns: 1fr; gap: 16px; }
  .steps-vertical .step:not(:last-child)::after { display: none; }
}
.steps-vertical .step { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 16px; }
.steps-vertical .step::before { grid-row: span 2; margin-bottom: 0; }
.step h3 { margin-bottom: 6px; font-size: 1.12rem; }
.step p { margin: 0 0 12px; color: var(--text-muted); font-size: .95rem; }
.step p:last-child { margin-bottom: 0; }

/* --- Timeline (roadmap, events) --- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--accent), rgba(221, 177, 95, .12)); }
.timeline-item { position: relative; padding: 0 0 26px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -30px; top: 2px; width: 20px; height: 20px; background: var(--accent);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.timeline-item.is-done::before { background: var(--success); }
.timeline-item.is-now::before { background: var(--warning); }
.timeline-item.is-future::before { opacity: .38; }
.timeline-when { display: block; color: var(--accent); font: 700 .78rem/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.timeline-item h3 { margin-bottom: 6px; font-size: 1.1rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.timeline-item p { margin: 0; color: var(--text-muted); }
.timeline-item ul { margin: 6px 0 0; color: var(--text-muted); }

/* --- Accordion (native <details>) --- */
.accordion { display: grid; gap: 12px; }
.accordion details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .15s ease; }
.accordion details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.accordion summary {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none;
  color: var(--text-strong); font-weight: 700; font-size: 1.04rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; margin-left: auto; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease;
}
.accordion details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.accordion summary:hover { color: var(--accent-strong); }
.accordion .answer { padding: 0 20px 18px; color: var(--text); }
.accordion .answer > :last-child { margin-bottom: 0; }

/* --- Empty state --- */
.empty {
  display: grid; justify-items: center; gap: 10px; padding: 40px 20px; text-align: center;
  border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface);
}
.empty img { width: 180px; opacity: .92; }
.empty h3 { margin: 6px 0 0; }
.empty p { margin: 0; max-width: 46ch; color: var(--text-muted); }

/* --- Key/value list --- */
.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 20px; margin: 0; }
.kv dt { color: var(--text-muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--text-strong); overflow-wrap: anywhere; }

/* --- Sub-navigation --- */
.subnav { display: flex; gap: 6px; overflow-x: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.subnav a { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.subnav a:hover { background: var(--surface-2); color: var(--text-strong); }
.subnav a[aria-current="page"] { background: rgba(221, 177, 95, .14); color: var(--accent-strong); box-shadow: inset 3px 0 0 var(--accent); }
.subnav .icon { color: var(--accent); }
.with-sidebar { display: grid; gap: 24px; }
@media (min-width: 960px) {
  .with-sidebar { grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
  .with-sidebar .subnav { flex-direction: column; position: sticky; top: calc(var(--header-h) + 16px); }
}

/* --- Prose (rendered markup) --- */
.prose { font-size: 1.04rem; line-height: 1.75; }
.prose > * + * { margin-top: 1em; }
.prose p, .prose ul { margin-bottom: 0; }
.prose h2 { margin-top: 1.6em; font-size: 1.55rem; }
.prose h3 { margin-top: 1.4em; font-size: 1.22rem; }
.prose ul { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 24px; }
.prose li + li { margin-top: .4em; }
.prose li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 11px; height: 11px; background: var(--accent);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.prose a { overflow-wrap: anywhere; }

/* --- Codes / QR (cabinet 2FA) --- */
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; padding: 0; margin: 0; list-style: none; }
.codes li { padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: 8px; font-family: var(--font-mono); text-align: center; letter-spacing: .08em; }
.qr { display: inline-block; padding: 12px; border-radius: var(--radius-sm); background: #fff; line-height: 0; }

/* ============================== 7. Pages ============================== */

/* --- Hero (home) --- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: var(--chrome-text);
  background: #041317;
  padding: clamp(64px, 10vw, 140px) 0 clamp(110px, 14vw, 180px);
  min-height: min(90vh, 820px); display: flex; align-items: center;
}
.hero > .container { width: 100%; }
.hero-bg {
  position: absolute; inset: 0; z-index: -3;
  background: url("../img/hero.svg") 70% 100% / cover no-repeat;
}
.hero-waves {
  position: absolute; left: -10%; right: -10%; bottom: 0; height: 34%; z-index: -2; pointer-events: none;
  background: url("../img/waves.svg") repeat-x 0 100% / 900px 100%;
  opacity: .85;
  animation: sea-drift 30s linear infinite;
}
.hero-glow {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(420px 260px at 76% 26%, rgba(239, 205, 133, .16), transparent 70%);
  animation: glow-pulse 9s ease-in-out infinite alternate;
}
@keyframes sea-drift { from { transform: translateX(0); } to { transform: translateX(-900px); } }
@keyframes glow-pulse { from { opacity: .7; } to { opacity: 1; } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 12, 15, .9) 0%, rgba(2, 12, 15, .6) 40%, rgba(2, 12, 15, .05) 75%, rgba(2, 12, 15, .2) 100%),
    linear-gradient(180deg, rgba(2, 12, 15, .5) 0%, rgba(2, 12, 15, 0) 28%, rgba(2, 12, 15, 0) 70%, rgba(2, 12, 15, .65) 100%);
}
@media (max-width: 979px) {
  .hero::before { background: linear-gradient(180deg, rgba(2, 12, 15, .55) 0%, rgba(2, 12, 15, .78) 55%, rgba(2, 12, 15, .92) 100%); }
  .hero { min-height: 0; }
}
.hero::after, .page-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; background: var(--bg);
  -webkit-mask: url("../img/waves-mask.svg") center bottom / 100% 100% no-repeat;
  mask: url("../img/waves-mask.svg") center bottom / 100% 100% no-repeat;
}
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); } }
.hero h1 {
  margin-bottom: 18px; color: #fbf3dc; font-size: clamp(2.5rem, 1.4rem + 4.6vw, 4.9rem); line-height: 1.03;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .6), 0 0 60px rgba(76, 191, 173, .15);
}
.hero h1 .gold { background: var(--bronze-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .eyebrow { color: var(--bronze-300); }
.hero-lead { max-width: 54ch; margin-bottom: 28px; font-size: clamp(1.02rem, .96rem + .3vw, 1.18rem); color: #d9d3bd; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 559px) {
  .hero-actions .btn, .cta .cluster .btn { flex: 1 1 100%; }
  .eyebrow { letter-spacing: .12em; }
}
.hero-note { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: #c4c2ad; font-size: .92rem; }
.hero-note li { display: inline-flex; align-items: center; gap: 8px; }
.hero-note .icon { color: var(--teal-300); }

.hero-panel {
  --text: var(--chrome-text);
  --text-muted: var(--chrome-muted);
  --text-strong: #fbf3dc;
  --heading: #fbf3dc;
  --border: rgba(221, 177, 95, .22);
  --border-strong: rgba(221, 177, 95, .4);
  --surface: rgba(5, 24, 29, .72);
  --surface-2: rgba(18, 54, 62, .8);
  --accent: var(--bronze-400);
  color: var(--text);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.hero-panel .card-title { font-size: 1.1rem; }
.panel-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.panel-status .status-label { font-size: 1.05rem; }
.panel-players { text-align: right; }
.panel-players b { display: block; font: 700 1.9rem/1 var(--font-display); color: var(--bronze-300); font-variant-numeric: tabular-nums; }
.panel-players span { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }
.panel-version { display: block; margin-top: 4px; }
.panel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.panel-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-list span { color: var(--text-muted); font-size: .92rem; }
.panel-list b { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.event-mini { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.event-mini-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); color: var(--bronze-300); background: rgba(221, 177, 95, .08); }
.event-mini h3 { margin: 0; font-size: 1.02rem; }
.event-mini p { margin: 2px 0 0; font-size: .88rem; color: var(--text-muted); }

/* --- Page head (inner pages) --- */
.page-head {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(40px, 6vw, 72px) 0 clamp(68px, 8vw, 96px); color: var(--chrome-text);
  background:
    url("../img/stars.svg") repeat 0 0 / 420px,
    radial-gradient(700px 300px at 85% 115%, rgba(76, 191, 173, .26), transparent 70%),
    linear-gradient(180deg, #031216 0%, #07222a 70%, #0c3239 100%);
}
.page-head::before {
  content: ""; position: absolute; right: max(3vw, 12px); bottom: 26px; z-index: -1;
  width: clamp(150px, 24vw, 300px); aspect-ratio: 1;
  background: url("../img/compass.svg") center / contain no-repeat; opacity: .16;
}
.page-head h1 { margin: 0; color: #fbf3dc; }
.page-head + .section { padding-top: clamp(28px, 4vw, 48px); }
.page-head .eyebrow { color: var(--bronze-300); }
.page-head .lead { margin: 14px 0 0; max-width: 62ch; color: #cfcab4; font-size: 1.08rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; font-size: .88rem; color: var(--chrome-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumbs a { color: var(--chrome-text); text-decoration: none; }
.breadcrumbs a:hover { color: var(--bronze-300); }

/* --- Rates band (home, about) --- */
.rates { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .rates { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* --- Races (home, about) --- */
.race-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.race-card {
  --race: 221, 177, 95;
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  min-height: 300px; padding: 22px 20px 20px; border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--race), .38); color: #e6dfca;
  background:
    radial-gradient(260px 200px at 80% 0%, rgba(var(--race), .3), transparent 70%),
    linear-gradient(180deg, #082128 0%, #051419 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3), inset 0 -3px 0 rgba(var(--race), .8);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.race-card:hover, .race-card:focus-within {
  transform: translateY(-5px); border-color: rgba(var(--race), .85);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .4), 0 0 40px rgba(var(--race), .22), inset 0 -3px 0 rgba(var(--race), 1);
}
.race-nuian { --race: 222, 178, 92; }
.race-elf { --race: 140, 214, 168; }
.race-firran { --race: 236, 128, 84; }
.race-harani { --race: 120, 186, 255; }
.race-dwarf { --race: 176, 160, 140; }
.race-warborn { --race: 196, 96, 96; }
.race-crest { width: 64px; height: 64px; color: rgb(var(--race)); filter: drop-shadow(0 0 14px rgba(var(--race), .4)); }
.race-card h3 { margin: 6px 0 0; color: #fbf3dc; font-size: 1.4rem; }
.race-card p { margin: 0; color: #c9c4ad; font-size: .93rem; line-height: 1.5; }
.race-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding: 8px 0 0; list-style: none; }
.race-tags li { padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: rgb(var(--race)); border: 1px solid rgba(var(--race), .45); background: rgba(var(--race), .08); }
.race-card.is-locked { opacity: .78; }
.race-card.is-locked .race-crest { filter: grayscale(.6); }
@media (max-width: 559px) {
  .race-grid.is-scroll { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .race-grid.is-scroll .race-card { scroll-snap-align: start; }
}

/* --- Factions / world (about) --- */
.faction-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.faction { --f: 221, 177, 95; border-left: 4px solid rgb(var(--f)); }
.faction-nuia { --f: 222, 178, 92; }
.faction-haranya { --f: 120, 186, 255; }
.faction-pirate { --f: 240, 132, 103; }
.faction h3 { display: flex; align-items: center; gap: 10px; }
.faction h3 .icon { color: rgb(var(--f)); }
.faction p { color: var(--text-muted); margin: 0; }
.faction ul { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.faction li { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: .84rem; }
.skill-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); list-style: none; margin: 0; padding: 0; }
.skill-grid li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.skill-grid .icon { color: var(--accent); margin-top: 2px; }
.skill-grid b { display: block; color: var(--text-strong); }
.skill-grid span { color: var(--text-muted); font-size: .88rem; }
.world { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .world { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; } }
.world-art { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow); line-height: 0; background: #041317; }
.world-art img { width: 100%; }
.facts { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.facts li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.facts .icon-wrap { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--accent); background: rgba(221, 177, 95, .1); border: 1px solid var(--border); }
.facts b { display: block; color: var(--text-strong); }
.facts span { color: var(--text-muted); font-size: .95rem; }

/* --- News --- */
.news-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; color: var(--text-muted); font-size: .86rem; }
.news-card h3 { margin-bottom: 10px; font-size: 1.24rem; }
.news-card h3 a { color: var(--heading); text-decoration: none; }
.news-card h3 a:hover { color: var(--accent-strong); }
.news-card p { color: var(--text-muted); }
.news-card .more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.news-list { display: grid; gap: 18px; }
.news-row { display: grid; gap: 8px 24px; }
@media (min-width: 760px) { .news-row { grid-template-columns: 150px minmax(0, 1fr); } }
.news-row h2 { margin-bottom: 8px; font-size: 1.32rem; }
.news-row h2 a { color: var(--heading); text-decoration: none; }
.news-row h2 a:hover { color: var(--accent-strong); }
.news-date { color: var(--text-muted); font-size: .9rem; }
.news-date b { display: block; font: 700 1.6rem/1.1 var(--font-display); color: var(--accent); }
.article { padding: clamp(24px, 4vw, 44px); }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 24px; color: var(--text-muted); font-size: .92rem; }
.article-meta .icon { color: var(--accent); }
.article-image { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); line-height: 0; }
.article-back { margin-top: 32px; }

/* --- Rankings --- */
.rank-pos { width: 64px; font-weight: 800; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rank-medal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: .9rem; color: #1c1304; }
.rank-1 .rank-medal { background: linear-gradient(180deg, #ffe6a3, #d9a23a); box-shadow: 0 0 14px rgba(239, 205, 133, .45); }
.rank-2 .rank-medal { background: linear-gradient(180deg, #f2f1ea, #aab2b8); }
.rank-3 .rank-medal { background: linear-gradient(180deg, #f3c39a, #b06f3a); }
.rank-name { font-weight: 700; color: var(--text-strong); overflow-wrap: anywhere; }
.rank-meta { display: block; color: var(--text-muted); font-size: .84rem; }
.rank-faction { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rank-faction::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.rank-faction.f-nuia::before { background: #deb25c; }
.rank-faction.f-haranya::before { background: #78baff; }
.rank-faction.f-pirate::before { background: var(--coral-400); }
@media (max-width: 559px) {
  .tab { flex: 1 0 auto; justify-content: center; padding: 8px 10px; font-size: .92rem; }
  .tab .icon { display: none; }
  .table .hide-sm { display: none; }
  .table th, .table td { padding: 10px 12px; }
  .rank-pos { width: 44px; }
  .table thead th { letter-spacing: .05em; }
}

/* --- Files --- */
.download-card { display: flex; flex-direction: column; gap: 14px; }
.download-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.download-actions .download-sha { margin: -2px 0 0; }
.download-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--border, rgba(255, 255, 255, .08)); }
.download-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border, rgba(255, 255, 255, .08)); font-size: .92rem; }
.download-facts span { color: var(--text-muted); }
.download-facts strong { font-weight: 600; text-align: right; }
.download-size { color: var(--text-muted); font-size: .9rem; }
.download-launcher { border-color: rgba(221, 177, 95, .45); box-shadow: 0 0 0 1px rgba(221, 177, 95, .12) inset; }
.download-launcher-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.download-launcher-head .card-title { margin: 0; }
.download-sha { margin: -6px 0 0; text-align: center; }
.download-sha-btn { background: none; border: 0; padding: 2px 4px; color: var(--text-muted); font: inherit; font-size: .82rem; cursor: copy; }
.download-sha-btn:hover, .download-sha-btn:focus-visible { color: var(--accent); }
.download-sha-btn code { font-size: inherit; }
@media (min-width: 960px) { .download-launcher { grid-column: span 2; } .download-main { align-self: start; } }
.req-table th { width: 34%; }
.download-hint { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--text-muted); font-size: .85rem; line-height: 1.45; }
.download-hint .icon { flex: none; color: var(--info); margin-top: .1em; }
.checklist { list-style: none; margin: 18px 0 26px; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; }
.checklist .icon { color: var(--success); margin-top: .18em; }

/* --- Rules --- */
.rules-nav { display: none; }
@media (min-width: 960px) {
  .rules-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
  .rules-nav { display: block; position: sticky; top: calc(var(--header-h) + 20px); }
}
.rules-nav ol { margin: 0; padding: 0; list-style: none; counter-reset: rn; }
.rules-nav li { counter-increment: rn; }
.rules-nav a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: .94rem; }
.rules-nav a::before { content: counter(rn) "."; color: var(--accent); min-width: 1.4em; }
.rules-nav a:hover { color: var(--text-strong); background: var(--surface); }
.rule-section { scroll-margin-top: calc(var(--header-h) + 16px); }
.rule-section + .rule-section { margin-top: 20px; }
.rule-section h2 { display: flex; gap: 12px; align-items: baseline; font-size: 1.45rem; }
.rule-num { color: var(--accent); font-size: 1.1rem; }
.rule-list { margin: 0; padding: 0; list-style: none; }
.rule-list > li { position: relative; padding-left: 46px; }
.rule-list > li + li { margin-top: 12px; }
.rule-list > li::before {
  content: attr(data-n); position: absolute; left: 0; top: 1px; min-width: 36px;
  color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; font-size: .92rem;
}
.penalty { color: var(--danger); font-weight: 700; }

/* --- CTA band --- */
.cta {
  position: relative; overflow: hidden; display: grid; gap: 20px; align-items: center;
  padding: clamp(28px, 5vw, 48px); border-radius: var(--radius-lg); border: 1px solid rgba(221, 177, 95, .35); color: var(--chrome-text);
  background:
    url("../img/stars.svg") repeat 0 0 / 420px,
    radial-gradient(500px 240px at 100% 100%, rgba(76, 191, 173, .3), transparent 70%),
    linear-gradient(135deg, #062027, #0d3a40);
  box-shadow: var(--shadow);
}
@media (min-width: 860px) { .cta { grid-template-columns: 1fr auto; } }
.cta h2 { margin: 0 0 8px; color: #fbf3dc; }
.cta p { margin: 0; color: #cfcab4; }

/* --- Errors --- */
.error-page { text-align: center; padding: clamp(48px, 8vw, 96px) 0; }
.error-code {
  display: block; font: 700 clamp(5rem, 3rem + 10vw, 9rem)/1 var(--font-display);
  background: var(--bronze-text); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .04em;
}
.error-page img { width: min(300px, 80%); margin: 8px auto 16px; display: block; }
.error-page p { max-width: 48ch; margin-left: auto; margin-right: auto; color: var(--text-muted); }
.error-page .cluster { justify-content: center; margin-top: 24px; }
.error-details { max-height: 360px; overflow: auto; padding: 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); font-size: .82rem; text-align: left; white-space: pre-wrap; }

/* ============================== 8. Cabinet / account pages (shared with the cabinet module) ==============================
   Templates of the cabinet are not wrapped in .container: top-level blocks are centred here. Working screens are flat. */
.site-main > .card,
.site-main > .cabinet,
.site-main > .page-body { width: calc(100% - 2 * var(--gutter)); max-width: var(--container); margin: clamp(24px, 4vw, 56px) auto; }
.site-main > .card-narrow { max-width: 480px; }
.card-narrow { max-width: 560px; }
.auth-card { padding: clamp(24px, 4vw, 36px); }
.auth-card h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); }
.auth-links { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-muted); text-align: center; }
.cabinet > h1 { margin-bottom: 4px; }
.cabinet > * + * { margin-top: 18px; }
.cabinet-nav { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 6px; }
.cabinet-nav-toggle { display: none; }
.cabinet-nav.is-collapsible .cabinet-nav-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px;
  border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.cabinet-nav-toggle strong { color: var(--text-strong); }
.cabinet-nav-toggle > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cabinet-nav-toggle .icon { flex: none; color: var(--text-muted); }
.cabinet-nav-chev { transition: transform .15s ease; }
.cabinet-nav.is-open .cabinet-nav-chev { transform: rotate(180deg); }
.cabinet-nav.is-collapsible .cabinet-nav-list { display: none; padding: 4px 0 2px; border-top: 1px solid var(--border); margin-top: 4px; }
.cabinet-nav.is-collapsible.is-open .cabinet-nav-list { display: block; }
.cabinet-nav-sec + .cabinet-nav-sec { margin-top: 10px; }
.cabinet-nav-head { margin: 6px 0 2px; padding: 0 10px; color: var(--text-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cabinet-nav-link { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); font-weight: 500; text-decoration: none; line-height: 1.35; }
.cabinet-nav-link .icon { flex: none; width: 1.05em; height: 1.05em; color: var(--text-muted); }
.cabinet-nav-link:hover { color: var(--text-strong); background: var(--surface-2); }
.cabinet-nav-link:hover .icon { color: var(--accent); }
.cabinet-nav-link[aria-current="page"] { color: var(--text-strong); background: var(--surface-2); font-weight: 600; }
.cabinet-nav-link[aria-current="page"] .icon { color: var(--accent); }
.cabinet-nav-link[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--accent); }
.cabinet-nav-badge {
  flex: none; margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--bronze-grad); color: var(--on-accent);
  font-size: .74rem; font-weight: 700; line-height: 1.55; text-align: center; font-variant-numeric: tabular-nums;
}
@media (min-width: 960px) {
  .cabinet { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .cabinet > * { grid-column: 2; }
  .cabinet > * + * { margin-top: 18px; }
  .cabinet > .cabinet-nav { grid-column: 1; grid-row: 1 / span 60; margin-top: 0; align-self: start; position: sticky; top: calc(var(--header-h) + 16px); padding: 8px; }
  .cabinet > h1 { margin-top: 0; }
  .cabinet-nav.is-collapsible .cabinet-nav-toggle { display: none; }
  .cabinet-nav.is-collapsible .cabinet-nav-list { display: block; border-top: 0; margin-top: 0; padding: 0; }
}
.cabinet > h1 { font-family: var(--font-body); font-size: clamp(1.45rem, 1.25rem + .6vw, 1.75rem); font-weight: 700; letter-spacing: 0; }
.cabinet h2, .cabinet h3 { font-family: var(--font-body); letter-spacing: 0; }
.cabinet .card h2, .cabinet .card-title { font-size: 1.08rem; font-weight: 700; }
.cabinet .card h3 { font-size: 1rem; }
.cabinet .card { padding: 20px; box-shadow: none; }
.cabinet-top { display: grid; gap: 18px; align-items: start; }
.cabinet-top > .card { margin: 0; }
@media (min-width: 1100px) { .cabinet-top { grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); } }
.cabinet-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--text-muted); font-size: .92rem; }
.cabinet-foot .inline-form { margin: 0; }
.cell-action { text-align: right; white-space: nowrap; width: 1%; }
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card h2 { font-size: 1.35rem; }
.card > .table { margin: 0 0 12px; }
.table-kv th { width: 38%; color: var(--text-muted); font-weight: 600; }
.card .table th, .card .table td { padding-left: 0; }
.card .table-wrap .table th, .card .table-wrap .table td { padding-left: 16px; }
.table-wrap + .muted, .table-wrap + p { margin-top: 12px; }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 0; }
.btn-link { min-height: 0; padding: 4px 2px; border: 0; background: none; color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; box-shadow: none; }
.btn-link:hover { color: var(--link-hover); transform: none; }
.secret-key { display: inline-block; padding: 8px 12px; font-size: 1.05rem; letter-spacing: .12em; word-break: break-all; }
.otpauth-uri { display: block; padding: 8px 10px; font-size: .8rem; word-break: break-all; }
.qr svg, .qr img { display: block; width: 200px; height: 200px; }
.backup-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.backup-codes li { padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: 8px; text-align: center; }
.backup-codes code { background: none; padding: 0; letter-spacing: .08em; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li + li { margin-top: 8px; }
details > summary { cursor: pointer; }
.topbar-logout { display: inline; margin: 0; }
.topbar-logout button { padding: 0 4px; border: 0; background: none; color: var(--chrome-muted); font: inherit; cursor: pointer; }
.topbar-logout button:hover { color: var(--bronze-300); text-decoration: underline; }

/* ============================== 9. Utilities, motion, print ============================== */
.sr-only, .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.gold { color: var(--accent); }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 40px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.nowrap { white-space: nowrap; }
.mx-auto { margin-left: auto; margin-right: auto; }
.link-muted { color: var(--text-muted); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow .icon { transition: transform .15s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .topbar, .site-header, .site-footer, .hero::after, .page-head::after, .btn, .pagination { display: none !important; }
  body { background: #fff; color: #000; }
  .page-head, .hero { background: none; color: #000; padding: 16px 0; }
  .card { box-shadow: none; background: none; border-color: #999; }
}

/* ============================== 10. Home «hx» (layout after ng-world.com/mmorpg) ============================== */
.hx-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(88vh, 760px); display: flex; align-items: center;
  padding: clamp(72px, 10vw, 120px) 0 clamp(56px, 7vw, 88px);
  background: radial-gradient(ellipse at 75% 30%, #1d5a5a 0%, #082027 45%, #031013 100%);
  color: var(--chrome-text); border-bottom: 1px solid var(--chrome-border);
}
.hx-hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hx-hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 16, 19, .96) 0%, rgba(3, 16, 19, .82) 32%, rgba(3, 16, 19, .25) 62%, rgba(3, 16, 19, .05) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
.hx-hero-inner { position: relative; }
.hx-hero-inner > * { max-width: 600px; }
.hx-hero-inner > .hx-title { max-width: 760px; }
.hx-title { margin: 0 0 18px; font: 700 clamp(2.6rem, 6vw, 4.4rem)/1.04 var(--font-display); color: var(--parch-50); text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.hx-accent { color: var(--teal-300); }
.hx-lead { margin: 0 0 28px; font-size: clamp(1.02rem, 1.6vw, 1.18rem); line-height: 1.65; color: #ddd6c0; text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
.hx-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.hx-hero .btn-ghost { --btn-fg: var(--chrome-text); --btn-border: rgba(221, 177, 95, .45); --btn-bg: rgba(3, 16, 19, .45); }
.hx-stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 0 0 22px; }
.hx-stats div { display: flex; flex-direction: column; }
.hx-stats dt { font: 700 1.9rem/1 var(--font-display); background: var(--bronze-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hx-stats dd { margin: 6px 0 0; font-size: .82rem; color: var(--chrome-muted); }
.hx-live { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--chrome-border); border-radius: 999px; background: rgba(3, 16, 19, .6); font-size: .88rem; color: var(--chrome-text); }
.hx-live-sep { opacity: .5; }

.hx-section { padding: clamp(48px, 7vw, 88px) 0; }
.hx-section + .hx-section { padding-top: 0; }
.hx-head { max-width: 720px; margin: 0 auto clamp(26px, 4vw, 40px); text-align: center; }
.hx-head .eyebrow { justify-content: center; color: var(--teal-300); }
.hx-head .eyebrow::before { display: none; }
.hx-head h2 { margin: 0 0 12px; font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.hx-head p { margin: 0; color: var(--text-muted); }
.hx-center { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; text-align: center; }
.hx-narrow { max-width: calc(840px + 2 * var(--gutter)); }

.hx-feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hx-feat { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(160deg, var(--surface), var(--bg-alt)); transition: border-color .2s ease, transform .2s ease; }
.hx-feat:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.hx-emblem { display: grid; place-items: center; width: 78px; height: 78px; margin-bottom: 18px; border-radius: 50%; overflow: hidden; color: var(--bronze-300); background: radial-gradient(circle, var(--abyss-700), var(--abyss-900)); border: 2px solid rgba(221, 177, 95, .5); box-shadow: 0 0 0 4px rgba(221, 177, 95, .08), 0 8px 20px rgba(0, 0, 0, .4); }
.hx-emblem img { width: 100%; height: 100%; object-fit: cover; }
.hx-emblem .icon { width: 28px; height: 28px; }
.hx-feat h3 { margin: 0 0 8px; font: 700 1.12rem/1.3 var(--font-body); color: var(--teal-300); }
.hx-feat p { margin: 0; color: var(--text-muted); font-size: .96rem; }

.hx-prose { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; max-width: 980px; margin: 0 auto; }
.hx-prose p { margin: 0 0 16px; line-height: 1.75; }

.hx-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hx-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.hx-card:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.hx-card-img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--abyss-700), var(--abyss-950)); }
.hx-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.hx-card:hover .hx-card-img img { transform: scale(1.05); }
.hx-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.hx-card-body b { font-size: 1.08rem; color: var(--heading); }
.hx-card-body span { font-size: .93rem; color: var(--text-muted); }

.hx-banner { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: 360px; padding: clamp(36px, 6vw, 64px) var(--gutter); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); text-align: center; color: var(--chrome-text); background: radial-gradient(ellipse at 50% 40%, #3b2a12, #120d06 70%); }
.hx-banner img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hx-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(3, 16, 19, .55) 0%, rgba(3, 16, 19, .82) 75%); }
.hx-banner-body { max-width: 640px; }
.hx-banner h2 { margin: 0 0 16px; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.1; color: var(--parch-50); }
.hx-banner p { margin: 0 0 24px; color: #d8d1bb; }
.hx-banner .btn-ghost { --btn-fg: var(--chrome-text); --btn-border: rgba(221, 177, 95, .45); }

.hx-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.hx-checks li { display: flex; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.hx-tick { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 6px; background: rgba(76, 191, 173, .14); color: var(--teal-300); }
.hx-tick .icon { width: 15px; height: 15px; }
.hx-checks b { display: block; margin-bottom: 2px; color: var(--heading); }
.hx-checks span { font-size: .9rem; color: var(--text-muted); }

.hx-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 14px; }
.hx-shot { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(135deg, var(--abyss-700), var(--abyss-950)); }
.hx-shot-0 { grid-row: span 2; }
.hx-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hx-shot:hover img { transform: scale(1.05); }
.hx-shot figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 14px; font-weight: 700; color: var(--parch-50); background: linear-gradient(0deg, rgba(3, 16, 19, .9), transparent); }

.hx-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.hx-steps li { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.hx-steps li > b { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 12px; font: 700 1.3rem/1 var(--font-display); color: var(--on-accent); background: var(--bronze-grad); }
.hx-steps h3 { margin: 0 0 8px; font: 700 1.12rem/1.3 var(--font-body); }
.hx-steps p { margin: 0; color: var(--text-muted); font-size: .95rem; }

.hx-why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hx-why article { padding: 24px; border-top: 3px solid var(--teal-400); border-radius: var(--radius-sm); background: linear-gradient(180deg, var(--surface), transparent); }
.hx-why h3 { margin: 0 0 8px; font: 700 1.08rem/1.3 var(--font-body); color: var(--heading); }
.hx-why p { margin: 0; color: var(--text-muted); font-size: .94rem; }

.hx-final { text-align: center; }
.hx-final .container { padding-top: clamp(36px, 5vw, 56px); padding-bottom: clamp(36px, 5vw, 56px); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: radial-gradient(ellipse at 50% 0%, rgba(76, 191, 173, .14), transparent 60%), var(--bg-alt); }
.hx-final h2 { margin: 0 0 10px; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.hx-final p { margin: 0; color: var(--text-muted); }
.hx-final .small { margin-top: 18px; }

:root[data-theme="light"] .hx-accent { color: var(--teal-500); }
:root[data-theme="light"] .hx-hero .hx-accent, :root[data-theme="light"] .hx-banner .hx-accent { color: var(--teal-300); }
:root[data-theme="light"] .hx-head .eyebrow, :root[data-theme="light"] .hx-feat h3 { color: var(--success); }

@media (max-width: 960px) {
  .hx-feat-grid, .hx-guide, .hx-checks, .hx-steps { grid-template-columns: repeat(2, 1fr); }
  .hx-why { grid-template-columns: repeat(2, 1fr); }
  .hx-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 180px); }
  .hx-shot-0 { grid-row: span 1; grid-column: span 2; }
}
@media (max-width: 620px) {
  .hx-hero { min-height: 0; }
  .hx-hero-img { object-position: 62% center; }
  .hx-hero-shade { background: linear-gradient(0deg, var(--bg) 0%, rgba(3, 16, 19, .78) 40%, rgba(3, 16, 19, .55) 100%); }
  .hx-feat-grid, .hx-guide, .hx-checks, .hx-steps, .hx-why, .hx-prose { grid-template-columns: 1fr; }
  .hx-stats { gap: 12px 22px; }
  .hx-stats dt { font-size: 1.5rem; }
  .hx-gallery { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 200px; }
  .hx-shot-0 { grid-column: auto; grid-row: auto; }
}
