/* Frontline Command project site.
   Visual language follows the game's console: warm charcoal and gunmetal, brass hairlines,
   one amber accent, square corners. Faction paints are semantic (they identify a faction)
   and are never used as decoration. Fonts are the game's own, self-hosted (SIL OFL). */

@font-face { font-family: "Stencil"; src: url("../fonts/BigShouldersStencilDisplay-wght.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/BarlowSemiCondensed-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/BarlowSemiCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/BarlowSemiCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

/* ---- Tokens ---------------------------------------------------------------
   The game's command interface is charcoal by design, so the site is dark-only. */
:root {
  color-scheme: dark;
  --bg: #11100e;
  --bg-raised: #171613;
  --panel: #1c1a16;
  --panel-2: #24211c;
  --line: rgb(217 207 184 / 0.11);
  --line-strong: rgb(217 207 184 / 0.22);
  --brass: #a8843f;
  --text: #ebe2cb;
  --text-2: #bab09a;
  --text-3: #958c79;
  --accent: #e2a232;
  --accent-hi: #f4c24e;
  --on-accent: #1a1408;
  --scrim: rgb(13 12 10 / 0.86);

  --us: #6e7358; --us-hi: #c6b98a;
  --ir: #5e6b4a; --ir-hi: #b9c58e;
  --sy: #8a5e36; --sy-hi: #d79a5c;
  --sa: #a08655; --sa-hi: #e0c27e;

  --f-display: "Stencil", "Barlow Semi Condensed", Impact, sans-serif;
  --f-ui: "Barlow Semi Condensed", "Barlow", "Arial Narrow", sans-serif;
  --f-body: "Barlow", system-ui, sans-serif;
  --f-mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* z-index scale: content 0, sticky sub-nav 20, nav 30, mobile menu 40, grain 50 */
  --z-subnav: 20; --z-nav: 30; --z-menu: 40; --z-grain: 50;
}

[data-faction="US"] { --paint: var(--us); --paint-hi: var(--us-hi); }
[data-faction="IR"] { --paint: var(--ir); --paint-hi: var(--ir-hi); }
[data-faction="SY"] { --paint: var(--sy); --paint-hi: var(--sy-hi); }
[data-faction="SA"] { --paint: var(--sa); --paint-hi: var(--sa-hi); }

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 56px); }
body {
  margin: 0; background: var(--bg); color: var(--text-2);
  font: 400 1.0625rem/1.62 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Fine metal grain from the game's own console texture; fixed, never on a scroller. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none;
  background: url("../img/noise.webp") repeat; opacity: 0.05; mix-blend-mode: overlay;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 65ch; }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-weight: 400; }
h1, h2 { font-family: var(--f-display); font-weight: 800; letter-spacing: 0.005em; line-height: 0.96; text-transform: uppercase; }
h1 { font-size: clamp(2.7rem, 5.6vw, 4.75rem); }
h2 { font-size: clamp(2.1rem, 3.8vw, 3.2rem); }
h3 { font: 700 1.2rem/1.2 var(--f-ui); text-transform: uppercase; letter-spacing: 0.035em; }
h4 { font: 600 1rem/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); }
strong { color: var(--text); font-weight: 600; }
code, kbd, .mono { font-family: var(--f-mono); font-size: 0.9em; }
code { color: var(--text); background: var(--panel-2); padding: 0.1em 0.35em; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; vertical-align: -0.2em; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.rule { border-top: 1px solid var(--line); }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--text-2); max-width: 58ch; }
.muted { color: var(--text-3); }
.eyebrow { font: 600 0.8rem/1 var(--f-ui); letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; display: block; }
.stack > * + * { margin-top: 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 12px; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font: 700 0.95rem/1 var(--f-ui); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  padding: 15px 22px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgb(255 240 200 / 0.35), 0 2px 0 #6b4a10; }
.btn--primary:hover { background: var(--accent-hi); transform: translateY(-1px); }
.btn--ghost { color: var(--text); border-color: var(--line-strong); background: rgb(17 16 14 / 0.55); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-hi); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn .icon { transition: transform 0.25s var(--ease); }
.btn:hover .icon--go { transform: translateX(3px); }
.link { color: var(--accent); text-decoration: none; font: 600 0.95rem/1.2 var(--f-ui); letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
.link:hover { color: var(--accent-hi); }
.link:hover .icon { transform: translateX(3px); }
.link .icon { transition: transform 0.25s var(--ease); }
.text-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; }
.text-link:hover { color: var(--accent-hi); text-decoration-color: currentColor; }

/* ---- Navigation ---------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav); height: var(--nav-h);
  background: rgb(17 16 14 / 0.9); backdrop-filter: blur(10px) saturate(130%); -webkit-backdrop-filter: blur(10px) saturate(130%);
  border-bottom: 1px solid var(--line);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex: none; }
.brand__mark { width: 30px; height: 30px; border: 1.5px solid var(--brass); display: grid; place-items: center; color: var(--accent); }
.brand__mark .icon { width: 18px; height: 18px; }
.brand__name { font: 800 1.35rem/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; }
.nav__links { display: flex; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav__links a {
  display: block; padding: 10px 12px; text-decoration: none; color: var(--text-2);
  font: 600 0.92rem/1 var(--f-ui); letter-spacing: 0.09em; text-transform: uppercase; position: relative;
}
.nav__links a:hover { color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--accent); }
.nav__cta { padding: 11px 16px; font-size: 0.85rem; }
.nav__toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); color: var(--text); width: 44px; height: 44px; place-items: center; cursor: pointer; }
.nav__toggle .icon { width: 22px; height: 22px; }

@media (max-width: 1000px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: grid; }
  .nav[data-open="true"] .nav__links {
    display: flex; flex-direction: column; position: fixed; inset: var(--nav-h) 0 auto 0; z-index: var(--z-menu);
    background: var(--bg-raised); border-bottom: 1px solid var(--line-strong); padding: 12px var(--gutter) 20px; gap: 0;
  }
  .nav[data-open="true"] .nav__links a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav[data-open="true"] .nav__links a[aria-current="page"]::after { display: none; }
  .nav[data-open="true"] .nav__links a[aria-current="page"] { color: var(--accent); }
}

/* ---- Home hero ----------------------------------------------------------- */
.hero { position: relative; min-height: calc(100dvh - var(--nav-h)); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero__art { position: absolute; inset: 0; z-index: -2; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(13 12 10 / 0.94) 0%, rgb(13 12 10 / 0.78) 34%, rgb(13 12 10 / 0.15) 64%, rgb(13 12 10 / 0) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgb(17 16 14 / 0) 26%);
}
.hero__content { padding-block: 64px 96px; max-width: 640px; }
.hero h1 { margin-bottom: 24px; }
.hero__sub { font-size: 1.25rem; line-height: 1.5; color: #d6ccb4; max-width: 34ch; margin-bottom: 36px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 760px) {
  .hero { align-items: flex-end; }
  .hero__art img { object-position: 70% 50%; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 8%, rgb(13 12 10 / 0.86) 52%, rgb(13 12 10 / 0.35) 100%); }
  .hero__content { padding-block: 40vh 48px; }
}

/* ---- Page header (inner pages) ------------------------------------------ */
.page-head { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-head__art { position: absolute; inset: 0; z-index: -2; }
.page-head__art img { width: 100%; height: 100%; object-fit: cover; opacity: 0.38; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 18%, rgb(17 16 14 / 0.7) 60%, rgb(17 16 14 / 0.3)), linear-gradient(0deg, var(--bg), transparent 60%); }
.page-head__inner { padding-block: clamp(56px, 8vw, 104px) clamp(48px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.page-head h1 { margin-bottom: 20px; }
.page-head__aside { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); align-self: end; }
.page-head__aside div { background: var(--bg-raised); padding: 16px 20px; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.page-head__aside dt { font: 600 0.85rem/1.2 var(--f-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.page-head__aside dd { margin: 0; font: 500 1.05rem/1.2 var(--f-mono); color: var(--text); text-align: right; }
@media (max-width: 860px) { .page-head__inner { grid-template-columns: 1fr; } }

/* ---- Numbers strip ------------------------------------------------------- */
.figures { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.figure { padding: 28px 20px 26px; border-left: 1px solid var(--line); }
.figure:first-child { border-left: 0; padding-left: 0; }
.figure__n { font: 500 clamp(2rem, 3.4vw, 2.9rem)/1 var(--f-mono); color: var(--text); letter-spacing: -0.02em; }
.figure__l { margin-top: 10px; font: 600 0.82rem/1.3 var(--f-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
@media (max-width: 900px) {
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .figure:nth-child(4) { border-left: 0; padding-left: 0; }
  .figure:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure:nth-child(odd) { border-left: 0; padding-left: 0; }
  .figure:nth-child(4) { border-left: 1px solid var(--line); padding-left: 20px; }
  .figure:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---- Framed media (screenshot in a console bezel) ----------------------- */
.frame { position: relative; border: 1px solid var(--line-strong); background: var(--panel); padding: 6px; box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.8); }
.frame::before { content: ""; position: absolute; inset: -1px; border-top: 2px solid var(--brass); width: 64px; pointer-events: none; }
.frame img { width: 100%; height: auto; }
.caption { margin-top: 14px; font-size: 0.92rem; color: var(--text-3); max-width: 70ch; }

/* ---- Core loop ----------------------------------------------------------- */
.loop { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 40px; counter-reset: loop; }
.loop li { list-style: none; padding: 18px 16px 0 0; border-top: 2px solid var(--line-strong); position: relative; }
.loop li:first-child { border-top-color: var(--accent); }
.loop b { display: block; font: 700 1.05rem/1.1 var(--f-ui); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); margin-bottom: 8px; }
.loop span { font-size: 0.93rem; line-height: 1.45; color: var(--text-3); display: block; }
.loop-wrap { padding: 0; margin: 0; }
@media (max-width: 960px) { .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; } }

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.split--flip > :first-child { order: 2; }
@media (max-width: 900px) { .split, .split--flip { grid-template-columns: 1fr; } .split--flip > :first-child { order: 0; } }

/* ---- Faction bento (home) ------------------------------------------------ */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(340px, auto); gap: 14px; margin-top: 48px; }
.fcell {
  position: relative; overflow: hidden; isolation: isolate; text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px; border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--paint) 34%, var(--panel)) 0%, var(--panel) 62%);
  transition: border-color 0.35s var(--ease);
}
.fcell::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--paint-hi); }
.fcell::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(0deg, var(--panel) 18%, color-mix(in srgb, var(--panel) 70%, transparent) 42%, transparent 66%); }
.fcell:hover { border-color: color-mix(in srgb, var(--paint-hi) 60%, transparent); }
.fcell__art { position: absolute; z-index: -1; right: -2%; top: 6%; width: min(62%, 420px); filter: drop-shadow(0 24px 30px rgb(0 0 0 / 0.55)); transition: transform 0.6s var(--ease); }
.fcell:hover .fcell__art { transform: translateY(-6px) scale(1.02); }
.fcell__tag { font: 600 0.8rem/1 var(--f-ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--paint-hi); margin-bottom: 10px; }
.fcell h3 { font: 800 clamp(1.9rem, 3vw, 2.5rem)/0.95 var(--f-display); text-transform: uppercase; letter-spacing: 0.005em; margin-bottom: 12px; }
.fcell p { margin: 0; color: var(--text-2); font-size: 1rem; max-width: 40ch; }
.fcell__more { margin-top: 18px; }
.fcell--a { grid-column: span 7; grid-row: span 2; }
.fcell--a .fcell__art { width: min(78%, 620px); top: 4%; }
.fcell--b, .fcell--c { grid-column: span 5; }
.fcell--b .fcell__art, .fcell--c .fcell__art { width: min(50%, 290px); top: 5%; right: 4%; }
.fcell--d { grid-column: span 12; min-height: 260px; }
.fcell--d .fcell__art { width: min(38%, 420px); top: 50%; transform: translateY(-50%); right: 4%; }
.fcell--d:hover .fcell__art { transform: translateY(calc(-50% - 6px)) scale(1.02); }
.fcell--d p { max-width: 52ch; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .fcell, .fcell--a, .fcell--b, .fcell--c, .fcell--d { grid-column: auto; grid-row: auto; min-height: 340px; }
  .fcell__art, .fcell--a .fcell__art, .fcell--d .fcell__art { width: 64%; top: 6%; right: -4%; transform: none; }
  .fcell--d:hover .fcell__art { transform: translateY(-6px); }
}

/* ---- Principles ---------------------------------------------------------- */
.principles { display: grid; gap: 0; margin-top: 32px; }
.principle { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.principle:last-child { border-bottom: 1px solid var(--line); }
.principle .icon { width: 26px; height: 26px; color: var(--accent); margin-top: 2px; }
.principle h3 { font-size: 1.12rem; margin-bottom: 6px; }
.principle p { margin: 0; font-size: 1rem; color: var(--text-3); }

/* ---- Status ledger ------------------------------------------------------- */
.ledger { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 48px; }
.ledger__col { background: var(--bg-raised); border: 1px solid var(--line); padding: clamp(24px, 3vw, 40px); }
.ledger__col--open { background: linear-gradient(180deg, rgb(226 162 50 / 0.07), transparent 60%), var(--bg-raised); border-color: rgb(226 162 50 / 0.28); }
.ledger h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.ledger h3 .icon { color: var(--accent); }
.ledger ul { list-style: none; margin: 0; padding: 0; }
.ledger li { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; font-size: 0.99rem; }
.ledger li b { font-weight: 500; color: var(--text); }
.ledger li small { display: block; color: var(--text-3); font-size: 0.9rem; margin-top: 3px; line-height: 1.45; }
.ledger .n { font: 500 1rem/1 var(--f-mono); color: var(--accent); white-space: nowrap; }
.ledger__col:not(.ledger__col--open) .n { color: var(--text); }
@media (max-width: 860px) { .ledger { grid-template-columns: 1fr; } }

/* ---- Contributor tracks -------------------------------------------------- */
.tracks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 48px; border: 1px solid var(--line); }
.track { padding: 28px 24px; border-left: 1px solid var(--line); text-decoration: none; display: flex; flex-direction: column; gap: 12px; transition: background-color 0.3s var(--ease); }
.track:first-child { border-left: 0; }
.track:hover { background: var(--panel); }
.track .icon { width: 30px; height: 30px; color: var(--accent); }
.track h3 { font-size: 1.1rem; }
.track p { margin: 0; font-size: 0.95rem; color: var(--text-3); line-height: 1.5; }
.track__stack { margin-top: auto; padding-top: 10px; font: 400 0.8rem/1.4 var(--f-mono); color: var(--text-2); }
@media (max-width: 1080px) { .tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); } .track { border-left: 0; border-top: 1px solid var(--line); } .track:nth-child(even) { border-left: 1px solid var(--line); } .track:nth-child(-n+2) { border-top: 0; } }
@media (max-width: 600px) { .tracks { grid-template-columns: 1fr; } .track:nth-child(even) { border-left: 0; } .track:nth-child(2) { border-top: 1px solid var(--line); } }

/* ---- Call band ------------------------------------------------------------ */
.band { position: relative; overflow: hidden; isolation: isolate; border-block: 1px solid var(--line); }
.band__art { position: absolute; inset: 0; z-index: -2; }
.band__art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(13 12 10 / 0.95) 30%, rgb(13 12 10 / 0.6)); }
.band__inner { padding-block: clamp(72px, 10vw, 136px); max-width: 720px; }
.band h2 { margin-bottom: 20px; }
.band p { font-size: 1.15rem; color: #d2c8b0; margin-bottom: 32px; }

/* ---- Footer ---------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 56px 40px; background: var(--bg-raised); font-size: 0.95rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer h4 { font-size: 0.85rem; letter-spacing: 0.14em; color: var(--text-3); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; color: var(--text-2); }
.footer a:hover { color: var(--accent-hi); }
.footer__note { margin-top: 16px; color: var(--text-3); font-size: 0.9rem; max-width: 46ch; }
.footer__base { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---- Sub navigation (sticky) --------------------------------------------- */
.subnav { position: sticky; top: var(--nav-h); z-index: var(--z-subnav); background: rgb(17 16 14 / 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.subnav__list { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; list-style: none; margin: 0; padding: 0; }
.subnav__list::-webkit-scrollbar { display: none; }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; text-decoration: none; white-space: nowrap; color: var(--text-3); font: 600 0.88rem/1 var(--f-ui); letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--text); }
.subnav a.is-active { color: var(--text); border-bottom-color: var(--paint-hi, var(--accent)); }
.subnav .swatch { width: 10px; height: 10px; background: var(--paint-hi); }

/* ---- Factions page ---------------------------------------------------------- */
.faction { border-bottom: 1px solid var(--line); }
.faction__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.faction__name { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font: 600 0.85rem/1 var(--f-ui); letter-spacing: 0.2em; text-transform: uppercase; color: var(--paint-hi); }
.faction__name::before { content: ""; width: 28px; height: 4px; background: var(--paint-hi); }
.faction h2 { margin-bottom: 22px; }
.faction__art { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; background: radial-gradient(60% 55% at 50% 58%, color-mix(in srgb, var(--paint) 45%, transparent), transparent 70%); }
.faction__art img { width: 88%; filter: drop-shadow(0 28px 34px rgb(0 0 0 / 0.6)); }
.faction__art figcaption { position: absolute; bottom: 0; left: 0; font-size: 0.85rem; color: var(--text-3); }
@media (max-width: 900px) { .faction__head { grid-template-columns: 1fr; } .faction__art { max-width: 520px; } }

.contract { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; border-top: 2px solid var(--paint-hi); background: var(--bg-raised); }
.contract div { padding: 22px 22px 24px; border-left: 1px solid var(--line); }
.contract div:first-child { border-left: 0; }
.contract dt { font: 600 0.8rem/1.2 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.contract dd { margin: 0; color: var(--text); font-size: 1rem; line-height: 1.5; }
@media (max-width: 900px) { .contract { grid-template-columns: 1fr 1fr; } .contract div:nth-child(3) { border-left: 0; } .contract div:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .contract { grid-template-columns: 1fr; } .contract div { border-left: 0; border-top: 1px solid var(--line); } }

.kit { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.kit__block { border: 1px solid var(--line); padding: clamp(22px, 3vw, 32px); background: var(--bg-raised); }
.kit__block h3 { margin-bottom: 18px; font-size: 1rem; color: var(--text-3); letter-spacing: 0.14em; }
.mech { padding: 14px 0; border-top: 1px solid var(--line); }
.mech:first-of-type { border-top: 0; padding-top: 0; }
.mech h4 { margin-bottom: 4px; }
.mech p { margin: 0; font-size: 0.97rem; color: var(--text-2); }
.ability { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.ability:first-of-type { border-top: 0; padding-top: 0; }
.ability p { grid-column: 1 / -1; margin: 0; font-size: 0.95rem; color: var(--text-2); }
.ability .cost { font: 500 0.85rem/1.4 var(--f-mono); color: var(--text-3); text-align: right; }
.ability--op { margin-top: 10px; padding: 16px; border: 1px solid color-mix(in srgb, var(--paint-hi) 40%, transparent); background: color-mix(in srgb, var(--paint) 14%, transparent); }
.ability--op h4 { color: var(--paint-hi); }
@media (max-width: 900px) { .kit { grid-template-columns: 1fr; } }

.roster-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin: 64px 0 20px; }
.roster-head h3 { font-size: 1.35rem; }
.roster-head p { margin: 6px 0 0; font-size: 0.95rem; color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 0.82rem/1 var(--f-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); background: transparent; border: 1px solid var(--line-strong); padding: 10px 14px; cursor: pointer; transition: color 0.2s, border-color 0.2s, background-color 0.2s; }
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.unit { background: var(--bg-raised); display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.unit[hidden] { display: none; }
.unit__art { position: relative; height: 150px; display: grid; place-items: center; background: radial-gradient(70% 60% at 50% 62%, color-mix(in srgb, var(--paint) 26%, transparent), transparent 72%); }
.unit__sprite { position: relative; width: var(--w, 120px); max-width: 82%; aspect-ratio: var(--ar, 1); }
.unit__sprite img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 10px rgb(0 0 0 / 0.5)); }
/* Team-colour layer: the game's own mask, tinted with the faction paint, exactly like the renderer does. */
.unit__team { position: absolute; inset: 0; background: var(--paint-hi); -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; mix-blend-mode: multiply; opacity: 0.9; }
.unit__wanted { display: grid; justify-items: center; gap: 8px; color: var(--text-3); text-decoration: none; font: 600 0.75rem/1 var(--f-ui); letter-spacing: 0.16em; text-transform: uppercase; }
.unit__wanted .icon { width: 40px; height: 40px; opacity: 0.55; }
.unit__wanted:hover { color: var(--accent); }
.unit__wanted:hover .icon { opacity: 1; }
.unit__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.unit__name { font: 700 1.04rem/1.15 var(--f-ui); color: var(--text); text-transform: uppercase; letter-spacing: 0.03em; }
.unit__id { font: 400 0.76rem/1 var(--f-mono); color: var(--text-3); margin-top: 5px; }
.unit__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; margin-top: auto; }
.unit__stats div { min-width: 0; }
.unit__stats dt { font: 600 0.7rem/1 var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.unit__stats dd { margin: 4px 0 0; font: 500 0.88rem/1.2 var(--f-mono); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.matchups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 48px; }
.matchup { background: var(--bg-raised); padding: 26px; }
.matchup__vs { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font: 700 1rem/1 var(--f-ui); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); }
.matchup__vs i { width: 10px; height: 10px; display: inline-block; }
.matchup__vs em { font-style: normal; color: var(--text-3); font-weight: 500; }
.matchup p { margin: 0 0 12px; font-size: 0.97rem; }
.matchup small { display: block; font-size: 0.88rem; color: var(--text-3); line-height: 1.5; }
.matchup small b { color: var(--text-2); font-weight: 600; }
@media (max-width: 960px) { .matchups { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .matchups { grid-template-columns: 1fr; } }

/* ---- Docs layout (mechanics, modes, engine) -------------------------------- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 32px); padding-top: 8px; }
.toc h4 { font-size: 0.78rem; letter-spacing: 0.16em; color: var(--text-3); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--text-3); font: 500 0.95rem/1.3 var(--f-ui); letter-spacing: 0.02em; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--text); border-left-color: var(--accent); }
@media (max-width: 980px) { .docs { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }

.chapter { padding-block: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; padding-top: clamp(40px, 5vw, 64px); }
.chapter > h2 { margin-bottom: 20px; }
.chapter > .lede { margin-bottom: 40px; }
.chapter h3 { margin: 48px 0 16px; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 32px 0; }
.metric { background: var(--bg-raised); padding: 22px 20px; }
.metric__n { font: 500 1.75rem/1 var(--f-mono); color: var(--text); letter-spacing: -0.02em; }
.metric__n small { font-size: 0.55em; color: var(--text-3); margin-left: 4px; letter-spacing: 0; }
.metric__l { margin-top: 10px; font-size: 0.9rem; color: var(--text-3); line-height: 1.4; }

.resources { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 32px 0; }
.resource { border-top: 2px solid var(--line-strong); padding-top: 18px; }
.resource:first-child { border-top-color: var(--accent); }
.resource .icon { width: 26px; height: 26px; color: var(--accent); margin-bottom: 12px; }
.resource h4 { margin-bottom: 6px; }
.resource p { margin: 0; font-size: 0.95rem; color: var(--text-3); }
@media (max-width: 860px) { .resources { grid-template-columns: 1fr 1fr; row-gap: 28px; } }

.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); background: var(--bg-raised); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 16px; white-space: nowrap; }
thead th { font: 600 0.78rem/1.2 var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line-strong); background: var(--panel); position: sticky; top: 0; }
tbody tr + tr td, tbody tr + tr th { border-top: 1px solid var(--line); }
tbody th { font: 600 0.95rem/1.2 var(--f-ui); color: var(--text); text-transform: uppercase; letter-spacing: 0.04em; }
td.num { font-family: var(--f-mono); text-align: right; color: var(--text); }
th.num { text-align: right; }
td.strong { color: var(--accent); }
td.off { color: var(--text-3); }
.table-note { font-size: 0.9rem; color: var(--text-3); margin-top: -8px; }
details.more { margin: 24px 0; border: 1px solid var(--line); background: var(--bg-raised); }
details.more > summary { cursor: pointer; padding: 18px 20px; list-style: none; display: flex; justify-content: space-between; align-items: center; font: 700 0.95rem/1 var(--f-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .icon { transition: transform 0.3s var(--ease); color: var(--accent); }
details.more[open] > summary .icon { transform: rotate(90deg); }
details.more .table-wrap { margin: 0; border: 0; border-top: 1px solid var(--line); }

.formula { font: 500 clamp(0.95rem, 1.6vw, 1.15rem)/1.6 var(--f-mono); color: var(--text); padding: 22px 24px; background: var(--panel); border-left: 3px solid var(--accent); margin: 28px 0; overflow-x: auto; }

.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 24px; margin: 28px 0; }
.key { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.key kbd { flex: none; min-width: 112px; font: 500 0.8rem/1 var(--f-mono); color: var(--text); text-align: center; padding: 8px 10px; background: linear-gradient(180deg, #2c2922, #201d18); border: 1px solid var(--line-strong); border-bottom-width: 3px; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: 24px 0; }
.fact { padding: 18px 0; border-top: 1px solid var(--line); }
.fact h4 { margin-bottom: 6px; }
.fact p { margin: 0; font-size: 0.98rem; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }

.callout { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px 22px; border: 1px solid rgb(226 162 50 / 0.3); background: rgb(226 162 50 / 0.06); margin: 28px 0; }
.callout .icon { width: 24px; height: 24px; color: var(--accent); }
.callout p { margin: 0; font-size: 0.98rem; }

/* Campaign tabs (modes page) */
.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line-strong); margin-top: 32px; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 14px 18px; cursor: pointer; display: flex; align-items: center; gap: 10px; color: var(--text-3); font: 700 0.92rem/1 var(--f-ui); letter-spacing: 0.08em; text-transform: uppercase; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--paint-hi); }
.tab .swatch { width: 10px; height: 10px; background: var(--paint-hi); }
.tabpanel { padding-top: 28px; }
.tabpanel[hidden] { display: none; }
.op-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.op-title h3 { margin: 0; font: 800 clamp(1.7rem, 3vw, 2.3rem)/1 var(--f-display); letter-spacing: 0.01em; }
.missions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); counter-reset: m; }
.mission { background: var(--bg-raised); padding: 22px; counter-increment: m; }
.mission h4 { display: flex; gap: 12px; align-items: baseline; margin-bottom: 10px; font-size: 1.02rem; }
.mission h4::before { content: counter(m); font: 500 0.95rem/1 var(--f-mono); color: var(--paint-hi); }
.mission p { margin: 0 0 8px; font-size: 0.95rem; color: var(--text); }
.mission small { display: block; font-size: 0.88rem; color: var(--text-3); line-height: 1.45; }
@media (max-width: 960px) { .missions { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .missions { grid-template-columns: 1fr; } }

.maps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; margin-top: 8px; }
.map { display: flex; flex-direction: column; gap: 14px; }
.map img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; image-rendering: pixelated; border: 1px solid var(--line-strong); background: var(--bg-raised); transition: border-color 0.3s var(--ease); }
.map:hover img { border-color: var(--brass); }
.map h4 { margin-bottom: 2px; }
.map p { margin: 0; font-size: 0.93rem; line-height: 1.45; }
.map .map__meta { font: 500 0.78rem/1.4 var(--f-mono); color: var(--accent); margin-bottom: 6px; }
.map .map__q { color: var(--text-3); margin-top: 6px; }
@media (max-width: 1100px) { .maps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .maps { grid-template-columns: 1fr; } }

.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: 28px 0; }
.mode { background: var(--bg-raised); padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mode h4 { margin-bottom: 4px; }
.mode .who { font: 500 0.8rem/1.3 var(--f-mono); color: var(--accent); margin-bottom: 10px; display: block; }
.mode p { margin: 0; font-size: 0.94rem; color: var(--text-3); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; padding: 0; list-style: none; }
.tags li { font: 500 0.88rem/1 var(--f-ui); letter-spacing: 0.04em; padding: 9px 12px; border: 1px solid var(--line-strong); color: var(--text-2); }

/* Engine page */
.arch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 32px 0; }
.arch__box { border: 1px solid var(--line); background: var(--bg-raised); padding: 24px; position: relative; }
.arch__box--core { border-color: rgb(226 162 50 / 0.4); background: linear-gradient(180deg, rgb(226 162 50 / 0.08), transparent 70%), var(--bg-raised); }
.arch__box h4 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.arch__box h4 .icon { color: var(--accent); width: 22px; height: 22px; }
.arch__box p { margin: 0 0 12px; font-size: 0.95rem; }
.arch__box code { font-size: 0.8rem; }
@media (max-width: 900px) { .arch { grid-template-columns: 1fr; } }
.tree { font: 400 0.92rem/1.75 var(--f-mono); background: var(--bg-raised); border: 1px solid var(--line); padding: 22px 24px; overflow-x: auto; color: var(--text-2); white-space: pre; margin: 24px 0; }
.tree b { color: var(--text); font-weight: 500; }
.tree i { color: var(--text-3); font-style: normal; }

.sprite-demo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 28px 0; }
.sprite-demo figure { margin: 0; border: 1px solid var(--line); background: var(--bg-raised); padding: 18px; display: grid; gap: 12px; }
.sprite-demo .stage { height: 170px; display: grid; place-items: center; background: repeating-conic-gradient(#1b1915 0 25%, #211f1a 0 50%) 0 0 / 16px 16px; }
.sprite-demo figcaption { font-size: 0.9rem; color: var(--text-3); }
.sprite-demo figcaption b { display: block; color: var(--text); font: 700 0.92rem/1.2 var(--f-ui); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
@media (max-width: 760px) { .sprite-demo { grid-template-columns: 1fr; } }

/* Contribute page */
.steps { list-style: none; margin: 32px 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; align-items: center; padding: 20px 22px; border: 1px solid var(--line); background: var(--bg-raised); }
.steps h4 { margin-bottom: 4px; }
.steps p { margin: 0; font-size: 0.95rem; color: var(--text-3); }
.steps pre { margin: 0; font: 400 0.88rem/1.6 var(--f-mono); color: var(--text); background: var(--bg); border: 1px solid var(--line); padding: 12px 14px; overflow-x: auto; }
@media (max-width: 760px) { .steps li { grid-template-columns: 1fr; } }

.fronts { display: grid; gap: 14px; margin-top: 40px; }
.front { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); background: var(--bg-raised); }
.front__title { display: flex; gap: 16px; align-items: flex-start; }
.front__title .icon { width: 32px; height: 32px; color: var(--accent); margin-top: 2px; }
.front h3 { margin-bottom: 8px; }
.front__title p { margin: 0 0 14px; font-size: 0.98rem; }
.front__stack { font: 400 0.82rem/1.5 var(--f-mono); color: var(--text-3); }
.front ul { margin: 0; padding: 0; list-style: none; }
.front li { padding: 11px 0 11px 22px; border-top: 1px solid var(--line); position: relative; font-size: 0.97rem; }
.front li:first-child { border-top: 0; padding-top: 0; }
.front li::before { content: ""; position: absolute; left: 0; top: 20px; width: 10px; height: 2px; background: var(--brass); }
.front li:first-child::before { top: 9px; }
@media (max-width: 860px) { .front { grid-template-columns: 1fr; } }

.gates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 40px 0 0; border: 1px solid var(--line); }
.gate { padding: 24px; border-left: 1px solid var(--line); background: var(--bg-raised); }
.gate:first-child { border-left: 0; }
.gate__id { font: 800 2.6rem/1 var(--f-display); color: var(--text); }
.gate h4 { margin: 10px 0 8px; }
.gate p { margin: 0 0 14px; font-size: 0.93rem; color: var(--text-3); }
.gate__state { font: 600 0.78rem/1.3 var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.gate__state--done { color: var(--text-2); }
@media (max-width: 900px) { .gates { grid-template-columns: 1fr 1fr; } .gate:nth-child(3) { border-left: 0; } .gate:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .gates { grid-template-columns: 1fr; } .gate { border-left: 0; border-top: 1px solid var(--line); } .gate:first-child { border-top: 0; } }

.rules-list { counter-reset: r; list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.rules-list li { padding: 18px 0; border-top: 1px solid var(--line); }
.rules-list h4 { margin-bottom: 6px; }
.rules-list p { margin: 0; font-size: 0.96rem; }
@media (max-width: 760px) { .rules-list { grid-template-columns: 1fr; } }

/* ---- Motion ---------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__art img { animation: settle 2.2s var(--ease) both; }
  .hero__content > * { animation: rise 0.9s var(--ease) both; animation-delay: calc(0.15s + var(--i, 0) * 0.09s); }
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes settle { from { transform: scale(1.07); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-transparency: reduce) { .nav, .subnav { background: var(--bg); backdrop-filter: none; } }
@media (max-width: 520px) { .ability { grid-template-columns: minmax(0, 1fr); } .ability .cost { text-align: left; } }
