/* Wingmen Chronicles: the game's own palette and HUD face, with restraint. */

@font-face {
  font-family: "WC2 5x7";
  src: url("fonts/wc2-5x7.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #04070b;
  --bg-2: #07111b;
  --panel: #000;
  --line: #173444;        /* the game's faint ink */
  --dim: #2f6f8f;         /* the game's dim ink */
  --cyan: #7fd4ff;        /* the game's primary HUD ink */
  --cyan-hi: #c8f0ff;
  --text: #b7c2c9;
  --heading: #eceae3;
  --bone: #c9ccc4;        /* Terran base */
  --ochre: #d9a441;       /* Terran accent */
  --ochre-hot: #f0bf5c;
  --amber: #ffb300;
  --alert: #ff5060;       /* the MFD's enemy red */
  --wine: #7e3048;        /* Raider field */
  --prussian: #0f3a5f;    /* Terran field */
  --engine: #32b2ff;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 64px;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(15, 58, 95, .30), transparent 70%),
    radial-gradient(900px 600px at -10% 40%, rgba(15, 58, 95, .14), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--body);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
figure, blockquote { margin: 0; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cyan-hi); }
p { margin: 0 0 1em; }
strong { color: var(--heading); font-weight: 600; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }

/* The 5x7 HUD face is only crisp at whole glyph pixels: 1em = 8 glyph pixels, so sizes are multiples of 8 px. */
.px {
  font-family: "WC2 5x7", ui-monospace, monospace;
  font-size: 16px;
  line-height: 1.5;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
  font-kerning: none;
  font-synthesis: none;
}
.dim { color: var(--dim); }
.pix { image-rendering: pixelated; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ochre); color: #000; padding: 8px 12px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ----------------------------------------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid var(--dim); background: rgba(0, 0, 0, .35); color: var(--cyan);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .2s, transform .15s;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan-hi); background: rgba(127, 212, 255, .08); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ochre); border-color: var(--ochre); color: #140d02; box-shadow: 0 8px 28px rgba(217, 164, 65, .22); }
.btn-primary:hover { background: var(--ochre-hot); border-color: var(--ochre-hot); color: #140d02; box-shadow: 0 10px 36px rgba(240, 191, 92, .32); }
.btn-steam { background: #0f2a40; border-color: #2a6f9c; color: var(--cyan-hi); }
.btn-ghost { background: rgba(4, 7, 11, .55); }
.btn-static { cursor: default; color: var(--dim); border-style: dashed; }
.btn-static:hover { color: var(--dim); border-color: var(--dim); background: rgba(4, 7, 11, .55); }
.btn-small { min-height: 40px; padding: 8px 16px; }
.btn-large { min-height: 56px; padding: 16px 32px; }
.tri { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor; }
.tri-left { transform: scaleX(-1); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-center { justify-content: center; }
.link-arrow { display: inline-flex; gap: 8px; color: var(--ochre); text-decoration: none; margin-top: 8px; }
.link-arrow:hover { color: var(--ochre-hot); }
.link-arrow span { transition: transform .2s; }
.link-arrow:hover span { transform: translateX(4px); }
.chip { border: 1px solid var(--line); background: #000; color: var(--cyan); padding: 8px 14px; cursor: pointer; }
.chip:hover { border-color: var(--dim); }
.chip[aria-pressed="true"] { background: var(--cyan); border-color: var(--cyan); color: #000; }
.chip[aria-pressed="true"] .dim { color: #0b3247; }

/* Four corner brackets, the game's targeting language. */
.hud { position: relative; }
.hud::before {
  content: ""; position: absolute; inset: -8px; pointer-events: none; z-index: 2;
  --c: var(--cyan); --l: 18px; --w: 2px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
  opacity: .75;
}

/* ----------------------------------------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 24px; padding-inline: var(--gutter);
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav[data-scrolled] { background: rgba(4, 7, 11, .78); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.nav-brand { display: flex; align-items: center; gap: 12px; color: var(--heading); text-decoration: none; margin-right: auto; }
.nav-brand:hover { color: #fff; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--cyan); text-decoration: none; opacity: .8; }
.nav-links a:hover { opacity: 1; color: var(--cyan-hi); }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 420px) { .nav-brand .px { display: none; } }

/* ----------------------------------------------------------------------------------------------- hero */
/* The game's own title screen comes up at dawn, as it does in the game, and the copy settles over the planet. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero { position: relative; overflow: hidden; height: min(56.25vw, 100svh); min-height: 560px; background: #000; }
.hero-art { position: absolute; inset: 0; background: #000 center 28% / cover no-repeat; }
.hero-art[data-still], .no-js .hero-art { background-image: url("media/title.webp"); }
.hero-art[data-still] .hero-video, .no-js .hero-video { display: none; }
.hero-video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(4, 7, 11, .45) 0%, rgba(4, 7, 11, 0) 14%, rgba(4, 7, 11, 0) 70%, rgba(4, 7, 11, .75) 88%, var(--bg) 100%); }
.hero-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(28px, 5svh, 64px); padding-inline: var(--gutter); display: grid; justify-items: center; gap: 18px; text-align: center; animation: settle 1s ease-out 1.6s both; }
@keyframes settle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero-pitch { margin: 0; font-size: 19px; line-height: 1.5; color: #e2e7ea; text-shadow: 0 2px 12px #000, 0 0 2px #000; text-wrap: balance; }
.hero .cta-row { justify-content: center; }
.hero-status { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; color: var(--cyan); text-shadow: 0 0 12px rgba(127, 212, 255, .35), 0 2px 8px #000; }
.cursor { display: inline-block; color: var(--ochre); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 899px) {
  .hero { height: auto; min-height: 0; padding-top: var(--nav-h); }
  .hero-art { position: relative; inset: auto; aspect-ratio: 16 / 9; }
  .hero::after { background: linear-gradient(180deg, rgba(4, 7, 11, 0) 70%, var(--bg) 100%); top: var(--nav-h); height: calc(100vw * 9 / 16); }
  .hero-copy { position: relative; bottom: auto; padding-block: 8px 40px; }
  .hero-pitch { font-size: 17px; }
}

/* ----------------------------------------------------------------------------------------------- status bar */
.ticker { border-block: 1px solid var(--line); background: rgba(0, 0, 0, .55); color: var(--dim); }
.ticker-track { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; padding: 12px var(--gutter); }
.ticker-track span { padding-inline: 18px; }
.ticker-track span + span { border-left: 1px solid var(--line); }
@media (max-width: 1000px) { .ticker-track span:nth-child(n+3) { display: none; } }
@media (max-width: 640px) { .ticker-track span:nth-child(n+2) { display: none; } }

/* ----------------------------------------------------------------------------------------------- sections */
.section { padding-block: clamp(88px, 11vw, 152px); position: relative; }
.trailer { padding-top: clamp(64px, 7vw, 104px); }
.sec-head { margin-bottom: clamp(36px, 5vw, 56px); }
.kicker { color: var(--dim); margin: 0 0 12px; }
.sec-title { font-size: 40px; line-height: 1.2; color: var(--heading); margin: 0 0 16px; text-wrap: balance; }
.sec-lede { font-size: 18px; max-width: 62ch; margin: 0; }
@media (max-width: 700px) { .sec-title { font-size: 32px; } }

/* ----------------------------------------------------------------------------------------------- player */
.player { aspect-ratio: 16 / 9; background: #000; box-shadow: 0 40px 120px rgba(0, 0, 0, .65), 0 0 0 1px var(--line); }
.player-video { width: 100%; height: 100%; background: #000; }
.player-start {
  position: absolute; inset: 0; z-index: 1; border: 0; padding: 0; cursor: pointer;
  display: grid; place-content: center; justify-items: center; gap: 20px; color: var(--heading);
  background: radial-gradient(closest-side, rgba(0, 0, 0, .15), rgba(0, 0, 0, .55)) center / cover;
}
.player-start .px { text-shadow: 0 2px 12px #000; }
.play-ring {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--ochre); background: rgba(4, 7, 11, .55); color: var(--ochre);
  box-shadow: 0 0 0 8px rgba(217, 164, 65, .12), 0 12px 40px rgba(0, 0, 0, .5);
  transition: transform .2s, background-color .2s, color .2s;
}
.play-ring .tri { border-width: 14px 0 14px 24px; margin-left: 6px; }
.player-start:hover .play-ring { transform: scale(1.06); background: var(--ochre); color: #140d02; }
.player[data-playing] .player-start { display: none; }
.player-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.player-small .play-ring { width: 76px; height: 76px; }

/* ----------------------------------------------------------------------------------------------- features */
.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; margin-bottom: clamp(80px, 10vw, 136px); }
.feature:last-child { margin-bottom: 0; }
.feature:nth-of-type(even) .feature-media { order: 2; }
.feature-media { background: #000; box-shadow: 0 30px 90px rgba(0, 0, 0, .55), 0 0 0 1px var(--line); }
.feature-media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.feature-media video[data-src*="aboard"] { aspect-ratio: 1660 / 705; }
.feature-index { color: var(--ochre); margin: 0 0 8px; }
.feature-title { font-size: 32px; line-height: 1.25; color: var(--heading); margin: 0 0 20px; text-wrap: balance; }
.caption { color: var(--dim); margin: 20px 0 0; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature:nth-of-type(even) .feature-media { order: 0; }
  .feature-title { font-size: 24px; }
}

/* ----------------------------------------------------------------------------------------------- band */
.band { position: relative; min-height: clamp(440px, 56vw, 760px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.band-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, rgba(4, 7, 11, .1) 22%, rgba(4, 7, 11, .15) 55%, rgba(4, 7, 11, .9) 88%, var(--bg) 100%); }
.band-copy { padding-bottom: clamp(48px, 8vw, 96px); }
.band-title { font-size: 64px; line-height: 1.1; color: var(--heading); margin: 0 0 16px; text-shadow: 0 4px 24px rgba(0, 0, 0, .7); }
.band-copy p:last-child { max-width: 52ch; font-size: 18px; color: #d6dde1; text-shadow: 0 2px 12px #000; }
@media (max-width: 700px) { .band-title { font-size: 40px; } }

/* ----------------------------------------------------------------------------------------------- terminal panels */
.terminal { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 0 0 1px rgba(127, 212, 255, .03), 0 50px 140px rgba(0, 0, 0, .7); position: relative; }
.term-bar { display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--cyan); }
.term-bar .dim { color: var(--dim); }
@media (max-width: 640px) { .term-bar .dim { display: none; } }

/* ----------------------------------------------------------------------------------------------- database */
.db-tabs { display: flex; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.db-tab { border: 1px solid var(--dim); background: #000; color: var(--cyan); padding: 8px 18px; cursor: pointer; }
.db-tab:hover { border-color: var(--cyan); }
.db-tab[aria-selected="true"] { background: var(--cyan); border-color: var(--cyan); color: #000; }
.db-panel { min-height: 640px; }
.js .db-panel:not(.is-active) { display: none; }
.db-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 640px; }
.db-list { list-style: none; margin: 0; padding: 8px 0; border-right: 1px solid var(--line); max-height: 720px; overflow-y: auto; scrollbar-color: var(--dim) #000; }
.db-group { color: var(--dim); padding: 16px 20px 6px; }
.db-item {
  width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; text-align: left;
  padding: 8px 20px; border: 0; border-left: 3px solid transparent; background: none; cursor: pointer; color: var(--cyan);
}
.db-item:hover { background: rgba(127, 212, 255, .06); }
.db-item[aria-current="true"] { background: rgba(127, 212, 255, .12); border-left-color: var(--cyan); }
.db-item img { width: 44px; height: 44px; object-fit: contain; }
.db-item .db-name { display: block; color: var(--heading); }
.db-item .db-sub { display: block; color: var(--dim); }
.db-item.raider { color: var(--alert); }
.db-item.raider[aria-current="true"] { border-left-color: var(--alert); background: rgba(255, 80, 96, .1); }
.db-detail { min-width: 0; position: relative; }
.js .db-entry:not(.is-active) { display: none; }
.db-entry { padding: 32px clamp(20px, 3vw, 40px) 40px; animation: entry-in .35s ease-out; }
@keyframes entry-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.no-js .db-entry + .db-entry { border-top: 1px solid var(--line); }
.db-label { color: var(--dim); }
.db-heading { font-size: 40px; line-height: 1.1; color: var(--heading); margin: 0 0 6px; }
.db-subheading { color: var(--cyan); margin: 0 0 20px; }
.db-quote { position: relative; margin: 24px 0 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--ochre); color: var(--bone); font-size: 18px; font-style: italic; max-width: 46ch; }
.db-quote cite { display: block; margin-top: 8px; font-style: normal; color: var(--dim); }
.db-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 20px 0 0; }
.db-facts div { background: #000; padding: 12px 14px; }
.db-facts dt { color: var(--dim); }
.db-facts dd { margin: 4px 0 0; color: var(--heading); }

/* crew dossier */
.dossier { display: grid; grid-template-columns: 192px minmax(0, 1fr) 220px; gap: 32px; align-items: start; }
.dossier-portrait { border: 1px solid var(--dim); background: #000; padding: 0; }
.dossier-portrait img { width: 192px; height: 192px; image-rendering: pixelated; }
.dossier-portrait figcaption { border-top: 1px solid var(--dim); padding: 6px 10px; color: var(--dim); }
.dossier-figure { align-self: end; justify-self: center; height: 460px; display: flex; align-items: flex-end; }
.dossier-figure img { max-height: 460px; width: auto; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .7)); }
.dossier-text p { max-width: 52ch; }
@media (max-width: 1180px) { .dossier { grid-template-columns: 192px minmax(0, 1fr); } .dossier-figure { display: none; } }

/* top ten */
.topten { margin-top: 0; padding: 20px; border-top: 1px solid var(--line); }
.topten table { width: 100%; border-collapse: collapse; }
.topten th { text-align: left; color: var(--dim); font-weight: normal; padding: 4px 8px 8px 0; }
.topten td { padding: 4px 8px 4px 0; color: var(--cyan); }
.topten td:first-child { color: var(--dim); width: 3ch; }
.topten tr.named td { color: var(--heading); }
.topten tr.you td { color: var(--ochre); }
.topten .num { text-align: right; }

/* decks: the game's deck map, labels down the sides with leader lines to each room */
.deck-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.deck-map { position: relative; margin: 28px auto 20px; width: min(100% - 32px, 1120px); }
.deck-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.deck-svg g { color: var(--dim); transition: color .2s; }
.deck-svg polyline { fill: none; stroke: currentColor; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.deck-svg rect { fill: currentColor; }
.deck-svg circle { fill: #000; stroke: currentColor; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.deck-svg g.on { color: var(--ochre); }
.deck-svg g.on circle { fill: var(--ochre); }
.deck-label { position: absolute; border: 0; background: none; padding: 2px 4px; color: var(--cyan); cursor: pointer; line-height: 1.5; }
.deck-label.left { text-align: right; }
.deck-label.right { text-align: left; }
.deck-label.south { white-space: nowrap; }
.deck-label:hover { color: var(--cyan-hi); }
.deck-label[aria-current="true"] { color: var(--ochre); }
.deck-chips { display: none; }
.deck-room { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; align-items: start; padding: 24px clamp(20px, 3vw, 40px) 40px; border-top: 1px solid var(--line); }
.deck-room-img { border: 1px solid var(--dim); background: #000; }
.deck-room-img img { width: 100%; height: auto; }
.crew-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.crew-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #000; padding: 4px 10px 4px 4px; color: var(--cyan); cursor: pointer; }
.crew-chip:hover { border-color: var(--dim); }
.crew-chip img { width: 32px; height: 32px; }

/* craft */
.craft-stage { position: relative; background:
    linear-gradient(rgba(23, 52, 68, .35) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(23, 52, 68, .35) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(closest-side, rgba(15, 58, 95, .35), transparent) center / 100% 100% no-repeat, #000;
  border: 1px solid var(--line); aspect-ratio: 16 / 9; display: grid; grid-template: 100% / 100%; place-items: center; padding: 44px 24px 64px; overflow: hidden; }
.craft-stage.raider { background:
    linear-gradient(rgba(68, 23, 33, .35) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(68, 23, 33, .35) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(closest-side, rgba(126, 48, 72, .3), transparent) center / 100% 100% no-repeat, #000; }
.craft-stage img { grid-area: 1 / 1; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .7)); }
.craft-stage img[hidden] { display: none; }
.craft-views { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.craft-views .chip { padding: 4px 10px; }
.craft-tag { position: absolute; right: 14px; top: 10px; color: var(--dim); }
.craft-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-top: 28px; }
.craft-entry.raider .db-subheading { color: var(--alert); }
.stat-table { width: 100%; border-collapse: collapse; }
.stat-table th { text-align: left; color: var(--dim); font-weight: normal; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.stat-table td { color: var(--heading); padding: 6px 0; border-bottom: 1px solid var(--line); text-align: right; }

@media (max-width: 900px) {
  .db-split { grid-template-columns: 1fr; min-height: 0; }
  .db-list { display: flex; overflow-x: auto; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; scroll-snap-type: x proximity; }
  .db-list li { flex: 0 0 auto; scroll-snap-align: start; }
  .db-group { display: none; }
  .db-item { grid-template-columns: 1fr; justify-items: center; text-align: center; width: auto; min-width: 96px; white-space: nowrap; gap: 6px; padding: 8px 12px; border-left: 0; border-bottom: 3px solid transparent; }
  .db-item[aria-current="true"] { border-bottom-color: var(--cyan); }
  .db-item.raider[aria-current="true"] { border-bottom-color: var(--alert); }
  .db-item .db-sub { display: none; }
  .db-item img { width: 56px; height: 56px; }
  .db-panel { min-height: 0; }
  .db-heading { font-size: 32px; }
  .dossier { grid-template-columns: 1fr; gap: 20px; }
  .dossier-portrait { justify-self: start; }
  .deck-label { display: none; }
  .deck-map { margin-bottom: 8px; }
  .deck-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0 16px 20px; }
  .deck-chips .chip[aria-current="true"] { background: var(--cyan); border-color: var(--cyan); color: #000; }
  .deck-room, .craft-info { grid-template-columns: 1fr; }
  .craft-stage { overflow: visible; margin-bottom: 104px; padding: 16px; }
  .craft-views { left: 0; right: 0; bottom: auto; top: calc(100% + 12px); }
  .craft-tag { display: none; }
}

/* in-game sprite turntables */
.spin { width: min(100%, 512px); margin-inline: auto; background-repeat: no-repeat; image-rendering: pixelated; cursor: grab; touch-action: pan-y; user-select: none; }
.spin.is-dragging { cursor: grabbing; }
.craft-stage [data-view-img="game"] { grid-area: 1 / 1; width: 100%; height: 100%; display: grid; place-items: center; }
.craft-stage [data-view-img="game"][hidden] { display: none; }
.craft-stage .spin { height: 100%; width: auto; }
.craft-stage .spin.wide { width: 100%; height: auto; }
.chip-game { border-color: var(--ochre); color: var(--ochre); }
.chip-game[aria-pressed="true"] { background: var(--ochre); border-color: var(--ochre); color: #140d02; }
.spin-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(48px, 6vw, 80px); }
.spin-card { margin: 0; border: 1px solid var(--line); background: radial-gradient(closest-side, rgba(15, 58, 95, .35), transparent) center / 100% 100% no-repeat, #000; }
.spin-card { display: flex; flex-direction: column; }
.spin-well { aspect-ratio: 4 / 3; display: grid; place-items: center; }
.spin-well .spin { height: 76%; width: auto; margin: 0; }
.spin-well .spin.wide { width: 90%; height: auto; }
.spin-card figcaption { border-top: 1px solid var(--line); padding: 10px 14px; color: var(--cyan); display: flex; justify-content: space-between; gap: 12px; }
.spin-card figcaption .dim { color: var(--dim); }
.spin-note { margin: 16px 0 0; color: var(--dim); text-align: center; }
@media (max-width: 760px) { .spin-row { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------------------------- gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.shot { position: relative; padding: 0; border: 0; background: #000; cursor: zoom-in; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.shot:first-child { grid-column: span 2; grid-row: span 2; }
.shot img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease, filter .3s; }
.shot:hover img { transform: scale(1.03); }
.shot .shot-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 14px 10px; text-align: left; color: var(--cyan-hi); background: linear-gradient(transparent, rgba(0, 0, 0, .85)); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.shot:hover .shot-cap, .shot:focus-visible .shot-cap { opacity: 1; transform: none; }
@media (hover: none) { .shot .shot-cap { opacity: 1; transform: none; } }
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gallery-grid { grid-template-columns: 1fr; } .shot:first-child { grid-column: auto; grid-row: auto; } }

.lightbox { width: min(100vw - 32px, 1600px); max-height: calc(100svh - 32px); padding: 0; border: 1px solid var(--dim); background: #000; color: var(--text); overflow: visible; }
.lightbox::backdrop { background: rgba(2, 4, 7, .92); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; height: auto; max-height: calc(100svh - 96px); object-fit: contain; }
.lightbox-caption { margin: 0; padding: 10px 14px; color: var(--cyan); border-top: 1px solid var(--line); }
.lightbox-btn { position: absolute; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--dim); background: rgba(0, 0, 0, .8); color: var(--cyan); cursor: pointer; }
.lightbox-btn:hover { border-color: var(--cyan); color: var(--cyan-hi); }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-close { right: 10px; top: 10px; }

/* ----------------------------------------------------------------------------------------------- making of */
.making-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 32px 0 0; }
.stats div { background: rgba(0, 0, 0, .85); padding: 16px 18px; display: flex; flex-direction: column-reverse; gap: 4px; }
.stats dt { color: var(--dim); }
.stats dd { margin: 0; font-size: 40px; line-height: 1.1; color: var(--ochre); }
@media (max-width: 960px) { .making-grid { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------------------------- demo */
.demo-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.demo-badge { color: var(--ochre); margin: -4px 0 20px; }
.reqs { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.reqs li { position: relative; padding-left: 26px; }
.reqs li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 10px; border: 2px solid var(--cyan); }
.check-body { padding: 20px; }
.check-row { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; color: var(--cyan); }
.check-row .dots { flex: 1; border-bottom: 2px dotted var(--line); transform: translateY(-4px); }
.check-row [data-check-gpu], .check-row [data-check-adapter], .check-row [data-check-device] { color: var(--heading); text-align: right; }
.check-verdict { margin: 20px 0 6px; padding: 12px 14px; border: 1px solid var(--dim); color: var(--cyan); }
.check-verdict.ok { border-color: #3f9c6b; color: #8ff0b8; }
.check-verdict.warn { border-color: #9c7a2a; color: var(--amber); }
.check-note { margin: 0; color: var(--dim); min-height: 1.5em; }
.check-share { margin: 0 20px 20px; }
@media (max-width: 900px) { .demo-grid { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------------------------- support */
.support { overflow: hidden; isolation: isolate; text-align: center; }
.support-art { position: absolute; inset: 0; z-index: -1; background: url("media/support.webp") center 40% / cover no-repeat; opacity: .38; -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 25%, #000 70%, transparent); }
.support-inner { max-width: 820px; }
.support .sec-title { font-size: 48px; }
.support-lede { font-size: 19px; color: #d6dde1; margin: 0 auto 32px; max-width: 58ch; }
.fine { margin-top: 20px; font-size: 14px; color: var(--dim); }
@media (max-width: 700px) { .support .sec-title { font-size: 32px; } }

/* ----------------------------------------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); background: #020407; padding: 56px 0 40px; }
.footer-inner { display: grid; justify-items: center; gap: 20px; text-align: center; }
.footer-brand img { width: 240px; height: auto; opacity: .9; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.footer-links a { color: var(--dim); text-decoration: none; }
.footer-links a:hover { color: var(--cyan); }
.copy { margin: 0; color: var(--dim); font-size: 14px; }

/* ----------------------------------------------------------------------------------------------- legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: calc(var(--nav-h) + 48px) var(--gutter) 96px; }
.legal h1 { font-size: 32px; color: var(--heading); margin: 0 0 32px; }
.legal h2 { font: 600 14px/1.4 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); margin: 40px 0 12px; }
.legal address { font-style: normal; }
.todo { background: rgba(255, 179, 0, .15); outline: 1px dashed var(--amber); color: var(--amber); }

/* ----------------------------------------------------------------------------------------------- motion */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero-art img { animation: none; }
}
