/* Ruins to Fortress - website 0.9.0 redesign.
   Colours: the game's menu palette (the same tokens as ruinstofortress.com/wiki/ and /news/).
   Type: Noto Sans for reading, the game's pixel font monogram (CC0) only for Latin headings at 32 / 48 px.
   Spacing scale: 4 8 12 16 24 32 48 72. One size per text role. */

@font-face { font-family: "monogram"; src: url(../fonts/monogram.ttf) format("truetype"); font-display: swap; }

:root {
  color-scheme: dark;
  --outline: #132124; --panel: #1e3231; --panel2: #24393a; --button: #45544f; --button-hi: #545e58;
  --line: #34463f; --deep: #0d1719;
  --white: #e8e9e8; --soft: #cdd2ce; --muted: #96a59e; --gold: #fccb2b; --gold-dark: #b98f12; --gold-ink: #1e3231;
  --sky: #60b0e8; --teal: #5fc4b4; --red: #f28b7d; --blue: #7cc4f0;
  --body: "Noto Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --head: "monogram", var(--body);
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  --head-h: 64px;
  --notch: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px),
                   calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}

/* the release switch: <html data-release="beta|live"> */
[data-release="beta"] [data-show="live"], [data-release="live"] [data-show="beta"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--outline); color: var(--white); font: 16px/1.65 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffe07a; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
b, strong { font-weight: 700; color: var(--white); }
p { margin: 0 0 16px; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1264px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
@media (min-width: 768px) { :root { --gut: max(32px, env(safe-area-inset-left, 0px)); --gut-r: max(32px, env(safe-area-inset-right, 0px)); } }

.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--gold); color: var(--gold-ink); font-weight: 700; padding: 12px 16px; }
.skip:focus { top: 8px; }

/* ---------------------------------------------------------------- headings and text roles */
h1, h2, h3 { margin: 0; font-weight: 400; }
h2 { font: 48px/1 var(--head); letter-spacing: 1px; color: var(--white); margin-bottom: 16px; text-wrap: balance;
     -webkit-font-smoothing: none; }
h3 { font: 700 18px/1.35 var(--body); color: var(--white); margin-bottom: 8px; }
h3.sub { font: 32px/1 var(--head); letter-spacing: 1px; color: var(--gold); margin: 48px 0 24px; -webkit-font-smoothing: none; }
.eyebrow { font: 700 13px/1.2 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.lead { font-size: 18px; line-height: 1.6; color: var(--soft); }
.narrow { max-width: 68ch; }
.note { font-size: 15px; color: var(--soft); margin: 24px 0 0; }
.bot-tag { font-family: var(--head); font-size: 1.25em; letter-spacing: .5px; color: var(--teal); white-space: nowrap; }
h2 .bot-tag { font-size: 1em; }
@media (max-width: 599px) {
  h2 { font-size: 32px; }
  .lead { font-size: 17px; }
}

/* ---------------------------------------------------------------- buttons (pixel bevel, >= 48 px tall) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 20px 12px;
       font: 700 16px/1.2 var(--body); color: var(--white); text-decoration: none; background: var(--button);
       border: 2px solid var(--outline); box-shadow: inset 0 -4px 0 #2f3b37, inset 0 2px 0 #5b6a64; cursor: pointer; }
.btn:hover { background: var(--button-hi); color: var(--white); }
.btn:active { box-shadow: inset 0 -2px 0 #2f3b37; transform: translateY(2px); }
.btn img { width: 22px; height: 22px; flex: none; }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 -4px 0 var(--gold-dark), inset 0 2px 0 #ffe58a; }
.btn-gold:hover { background: #ffd84f; color: var(--gold-ink); }
.btn-gold:active { box-shadow: inset 0 -2px 0 var(--gold-dark); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
.more { margin: 32px 0 0; }
.link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.link::after { content: "\2192"; margin-left: 8px; }

/* ---------------------------------------------------------------- header */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--outline); border-bottom: 2px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 16px; height: var(--head-h); }
.brand { display: flex; align-items: center; min-height: 44px; margin-right: auto; }
.brand img { height: 28px; width: auto; display: block; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--soft); font: 600 15px/1 var(--body);
              text-decoration: none; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--white); border-bottom-color: var(--gold); }
.btn-head { min-height: 44px; padding: 8px 16px 10px; font-size: 15px; }
.btn-head img { width: 20px; height: 20px; }
.menu-btn { display: none; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 12px; background: var(--button);
            color: var(--white); border: 2px solid var(--outline); font: 700 15px/1 var(--body); cursor: pointer;
            box-shadow: inset 0 -3px 0 #2f3b37; }
.menu-btn .bars, .menu-btn .bars::before, .menu-btn .bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; }
.menu-btn .bars::before { top: -6px; } .menu-btn .bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }
.mnav { position: absolute; left: 0; right: 0; top: 100%; background: var(--panel); border-bottom: 2px solid var(--line);
        box-shadow: 0 12px 24px rgba(0, 0, 0, .45); max-height: calc(100svh - var(--head-h)); overflow-y: auto; }
.mnav ul { padding-top: 8px; padding-bottom: 16px; }
.mnav a { display: flex; align-items: center; min-height: 52px; padding: 0 8px; color: var(--white); font: 600 17px/1 var(--body);
          text-decoration: none; border-bottom: 1px solid var(--line); }
.mnav a:hover { color: var(--gold); }
@media (max-width: 879px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (min-width: 880px) { .mnav { display: none !important; } }
.menu-btn .bars, .btn-head, .menu-btn { flex: none; }
@media (max-width: 599px) {
  .head-row { gap: 8px; }
  .brand img { height: 20px; }
}
@media (max-width: 399px) { .menu-label { display: none; } .menu-btn { padding: 0 13px; } .btn-head { padding: 8px 12px 10px; } }

/* ---------------------------------------------------------------- hero with parallax
   The scene is the 16:9 art (sky, mountains, ruins, foreground) sized like object-fit: cover from the hero's own size
   (container units), the hero character is placed beside the text panel. Only transforms move, from js/site.js. */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--deep); }
.hero-art { position: absolute; inset: 0; z-index: -1; overflow: hidden; container-type: size; }
.scene, .hero-art .char { position: absolute; bottom: 0; }
.scene { --sw: max(104cqw, 177.78cqh); width: var(--sw); aspect-ratio: 16 / 9;
         left: clamp(calc(102cqw - var(--sw)), calc(57cqw - .4607 * var(--sw)), -2cqw); }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; will-change: transform; }
.hero-art .char { --sw: max(104cqw, 177.78cqh); width: calc(.2453 * var(--sw)); height: auto;
                  left: calc(var(--cx) - .1227 * var(--sw)); inset-block: auto 0; inset-inline-end: auto;
                  --wl: max(32px, calc((100cqw - 1200px) / 2 + 32px));
                  --cx: max(57cqw, calc(var(--wl) + 504px + .1227 * var(--sw))); }
.scrim { position: absolute; inset: 0; pointer-events: none;
         background: linear-gradient(90deg, rgba(13, 23, 25, .78) 0, rgba(13, 23, 25, .5) 34%, rgba(13, 23, 25, 0) 56%),
                     linear-gradient(0deg, var(--outline) 0, rgba(19, 33, 36, .88) 9%, rgba(19, 33, 36, .45) 20%, rgba(19, 33, 36, 0) 34%); }
.hero-inner { display: flex; align-items: center; min-height: clamp(560px, calc(100svh - var(--head-h)), 820px); padding-top: 48px; padding-bottom: 72px; }
.hero-panel { width: 100%; max-width: 480px; padding: 32px; background: rgba(19, 33, 36, .9); border: 2px solid var(--line);
              box-shadow: inset 0 0 0 2px var(--outline); clip-path: var(--notch); }
.hero-panel h1 { margin: 0 0 16px; line-height: 0; }
.hero-panel h1 img { width: 100%; max-width: 416px; height: auto; }
.kicker { display: inline-block; font: 700 13px/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink);
          background: var(--gold); padding: 6px 10px; margin-bottom: 20px; }
.hero-panel .lead { margin-bottom: 0; }
.hero-panel .cta-row .btn { flex: 1 1 auto; }
.hero-panel .cta-row .btn-gold { flex-basis: 100%; }
.beta-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; color: var(--soft); }
.beta-note a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.beta-note a::after { content: "\2193"; margin-left: 6px; }

@media (max-width: 959px) {
  .hero-art { position: relative; inset: auto; height: clamp(300px, min(56svh, 110vw), 600px); z-index: 0; }
  .scene { --sw: max(104cqw, 177.78cqh); left: clamp(calc(102cqw - var(--sw)), calc(50cqw - .4607 * var(--sw)), -2cqw); }
  .hero-art .char { --sw: max(104cqw, 177.78cqh); --cx: 50cqw; }
  .scrim { background: linear-gradient(0deg, var(--outline) 0, rgba(19, 33, 36, 0) 30%); }
  .hero-inner { display: block; min-height: 0; padding-top: 0; padding-bottom: 48px; margin-top: -40px; position: relative; z-index: 1; }
  .hero-panel { max-width: 640px; margin-inline: auto; }
}
@media (max-width: 599px) {
  .hero-panel { padding: 24px 16px; }
  .hero-panel .cta-row .btn { flex-basis: 100%; }
}

/* ---------------------------------------------------------------- sections */
.sec { padding: 72px 0; }
.sec-alt { background: var(--panel); border-block: 2px solid var(--line); }
.sec-dark { background: var(--deep); border-block: 2px solid var(--line); }
@media (max-width: 599px) { .sec { padding: 48px 0; } }

/* beta band */
.band { padding: 48px 0; background: var(--panel); border-top: 4px solid var(--gold); border-bottom: 2px solid var(--line); }
.beta-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.beta-grid p { color: var(--soft); max-width: 60ch; }
.steps { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 24px 0; counter-reset: s; }
.steps li { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--outline); border: 2px solid var(--line); clip-path: var(--notch);
            font-size: 15px; line-height: 1.5; color: var(--soft); }
.steps .n { display: grid; place-items: center; width: 40px; height: 40px; background: var(--gold); color: var(--gold-ink);
            font: 32px/1 var(--head); -webkit-font-smoothing: none; padding-bottom: 4px; }
.know { padding: 24px; background: var(--outline); border: 2px solid var(--line); clip-path: var(--notch); }
.know h3 { color: var(--gold); }
.know li { position: relative; padding-left: 20px; margin-top: 12px; font-size: 15px; color: var(--soft); }
.know li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; background: var(--gold); }
@media (max-width: 1099px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 879px) { .beta-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 419px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { flex-direction: row; align-items: center; }
  .steps .n { flex: none; }
}

/* stats */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 32px 0; }
.stats li { padding: 16px; background: var(--panel); border: 2px solid var(--line); clip-path: var(--notch); text-align: center; }
.stats b { display: block; font: 48px/1 var(--head); color: var(--gold); -webkit-font-smoothing: none; }
.stats span { display: block; font-size: 14px; color: var(--soft); margin-top: 4px; }
@media (max-width: 879px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 479px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats li:last-child { grid-column: 1 / -1; } }

/* cards */
.cards { display: grid; gap: 16px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1099px) { .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 959px) { .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .cards-3, .cards-4 { grid-template-columns: minmax(0, 1fr); } }
.card { position: relative; padding: 24px; background: var(--panel2); border: 2px solid var(--line); clip-path: var(--notch); }
.sec-alt .card { background: var(--outline); }
.card p { margin: 0; font-size: 15px; color: var(--soft); }
.card .ico { display: block; width: 48px; height: 48px; image-rendering: pixelated; margin-bottom: 12px; }
.ico-inline { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: -8px; margin-right: 4px; }
.badge-bot { display: inline-flex; align-items: center; height: 48px; margin-bottom: 12px; font: 32px/1 var(--head); color: var(--teal); -webkit-font-smoothing: none; }
.cards.small { margin-top: 32px; }

.also { margin-top: 32px; padding: 24px; background: var(--panel); border: 2px solid var(--line); clip-path: var(--notch); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 600 14px/1.2 var(--body); color: var(--white); background: var(--button); padding: 8px 12px; }

/* screenshots and capture placeholders */
.shot { margin: 0; position: relative; }
.shot > img, .shot > video, .shot > .todo { display: block; width: 100%; border: 2px solid var(--outline); outline: 2px solid var(--line); outline-offset: 0; }
.shot > .todo { aspect-ratio: 16 / 9; }
.shot > img, .shot > video { height: auto; object-fit: contain; background: var(--deep); } /* whole picture, never cropped (owner, 24 Nov) */
.shot > img.pixel { image-rendering: pixelated; object-fit: contain; }
.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; }
.sec-alt .shot figcaption { color: #a7b4ae; }
.shot > .todo, .todo { display: flex; flex-direction: column; justify-content: center; gap: 8px; height: auto; padding: 24px; text-align: left;
        background: repeating-linear-gradient(135deg, #1a2c2e 0 12px, #162629 12px 24px); }
.todo b { font: 32px/1 var(--head); color: var(--gold); letter-spacing: 1px; -webkit-font-smoothing: none; }
.todo b::before { content: ""; display: inline-block; width: 12px; height: 12px; background: var(--gold); margin-right: 10px; vertical-align: 4px; }
.todo span { font-size: 14px; line-height: 1.5; color: var(--soft); max-width: 60ch; }
.shot.sm > .todo { padding: 16px; } .shot.sm > .todo b { font-size: 32px; } .shot.sm > .todo span { font-size: 13px; }
.calm .card { padding: 16px 16px 24px; }
.calm .shot { margin-bottom: 16px; }

/* split, timeline, features */
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 32px; }
@media (max-width: 959px) { .split { grid-template-columns: minmax(0, 1fr); } }
.timeline { position: relative; display: grid; gap: 16px; }
.timeline li { position: relative; padding: 0 0 0 48px; counter-increment: t; }
.timeline li::before { content: counter(t); position: absolute; left: 0; top: 0; width: 32px; height: 32px; display: grid; place-items: center;
                       background: var(--teal); color: var(--outline); font: 32px/1 var(--head); padding-bottom: 4px; -webkit-font-smoothing: none; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: -14px; width: 2px; background: var(--line); }
.timeline h3 { margin-bottom: 4px; padding-top: 4px; }
.timeline p { margin: 0; font-size: 15px; color: var(--soft); }
.timeline { counter-reset: t; }

.feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 48px; }
.feature.flip .shot { order: 2; }
.feature-text p { color: var(--soft); }
.feature-text h3 { font: 32px/1 var(--head); color: var(--gold); letter-spacing: 1px; margin-bottom: 16px; -webkit-font-smoothing: none; }
@media (max-width: 959px) {
  .feature { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 40px; }
  .feature.flip .shot { order: 0; }
}
.ticks li { position: relative; padding-left: 20px; margin-top: 8px; font-size: 15px; color: var(--soft); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; background: var(--gold); }

/* bosses */
.bosses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
@media (max-width: 959px) { .bosses { grid-template-columns: minmax(0, 1fr); } }
.boss { background: var(--outline); border: 2px solid var(--line); clip-path: var(--notch); }
.boss .shot > img, .boss .shot > .todo { outline: 0; border-width: 0 0 2px; }
.boss-body { padding: 24px; }
.boss-body > p { color: var(--soft); font-size: 15px; }
.boss h3 { font: 32px/1 var(--head); color: var(--white); letter-spacing: 1px; margin-bottom: 12px; -webkit-font-smoothing: none; }
.boss-body .where { font: 700 13px/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 8px !important; }
.facts { margin: 0; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 15px; }
.facts dt { color: var(--gold); font-weight: 700; }
.facts dd { margin: 0; color: var(--soft); }
.rules { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.rules li { font: 600 14px/1.3 var(--body); color: var(--white); background: var(--panel); border: 2px solid var(--line); padding: 8px 12px; }

/* modes */
.modes { margin-top: 32px; }
.card .mode-tag { font: 48px/1 var(--head); color: var(--gold); margin: 0 0 12px; -webkit-font-smoothing: none; }
.card .mode-tag.pve { color: var(--teal); } .card .mode-tag.pvp { color: var(--red); } .card .mode-tag.sandbox { color: var(--blue); } .card .mode-tag.dm { color: var(--gold); }

/* play together */
.stack { display: grid; gap: 12px; }
.stack .card { padding: 16px 20px; }
.stack .link { margin-top: 4px; }

/* DLC */
.dlc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.dlc-text p { color: var(--soft); }
.dlc-head { display: block; width: 100%; max-width: 460px; border: 2px solid var(--outline); outline: 2px solid var(--line); }
.skins { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.skins li { background: #1a1a1a; border: 2px solid var(--line); clip-path: var(--notch); text-align: center; padding-bottom: 12px; }
.skins img { display: block; width: 100%; height: auto; }
.skins span { display: block; padding: 0 8px; font: 600 13px/1.3 var(--body); color: var(--soft); }
@media (max-width: 959px) { .dlc { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
@media (max-width: 959px) { .skins { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 479px) { .skins { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* resources */
.res { margin-top: 32px; }
.res-card { padding: 0; }
.res-card a { display: block; height: 100%; padding: 24px; color: inherit; text-decoration: none; }
.res-card a:hover { background: var(--panel2); }
.res-card a:hover h3 { color: var(--gold); }
.res-card a:focus-visible { outline-offset: -5px; }
.res-ico { display: block; width: 48px; height: 48px; object-fit: contain; margin-bottom: 12px; }
.res-ico.px { image-rendering: pixelated; }
.res-card h3::after { content: " \2192"; color: var(--gold); }

/* footer */
.site-foot { background: var(--deep); border-top: 2px solid var(--line); padding: 48px 0 calc(32px + env(safe-area-inset-bottom, 0px)); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
.foot-brand img { display: block; width: 220px; height: auto; margin-bottom: 12px; }
.foot-brand p { color: var(--muted); font-size: 15px; margin: 0; }
.foot-nav ul { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--soft); font-weight: 600; font-size: 15px; }
.foot-nav a:hover { color: var(--gold); }
.copy { grid-column: 1 / -1; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.copy a { color: var(--soft); }
@media (max-width: 767px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } .foot-nav ul { margin-left: -8px; } }

/* motion preferences: no parallax, no smooth scrolling */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .layer, .hero-art .char { transform: none !important; will-change: auto; }
  .btn:active { transform: none; }
}

/* compact cards on phones: icon beside the text, less padding */
@media (max-width: 599px) {
  .card { padding: 16px; }
  .cards-3 .card:has(> .ico), .cards-3 .card:has(> .badge-bot) { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; }
  .cards-3 .card > .ico, .cards-3 .card > .badge-bot { grid-row: span 2; margin: 0; }
  .badge-bot { font-size: 24px; height: auto; }
  .res-card a { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; padding: 16px; }
  .res-card .res-ico { grid-row: span 2; margin: 0; }
  .res-card h3 { margin-bottom: 4px; }
  .also { padding: 16px; }
  .feature { margin-top: 32px; }
  .boss-body { padding: 16px; }
}

/* game animations (real Aseprite exports), always shown at a whole-number multiple of the art's pixels:
   characters 64x54 art px at 4x (3x on phones), dog 64x40 at 4x, Warlord 104x84 at 3x / 5x, Warden 176x144 at 2x / 3x */
.sprite { width: max-content; max-width: 100%; margin-inline: auto; line-height: 0; overflow: hidden; background: #2c4b55;
          border: 2px solid var(--outline); outline: 2px solid var(--line); }
.sprite img { display: block; image-rendering: pixelated; max-width: none; }
.sp-char img { width: 256px; height: 216px; }
.sp-dog { display: flex; align-items: flex-end; height: 220px; }
.sp-dog img { width: 256px; height: 160px; }
.sprite-fig { margin: 0 0 16px; }
.sprite-pair { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.sprite-pair > div { text-align: center; }
.sprite-pair p { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 599px) { .sprite-pair .sp-char img { width: 192px; height: 162px; } }

.shot.banner { margin-top: 32px; }
.stage { margin: 0; display: flex; justify-content: center; align-items: flex-end; height: 290px; background: var(--deep);
         border-bottom: 2px solid var(--line); overflow: hidden; }
.stage .sprite { outline: 0; border: 0; }
.sp-warlord { background: #080707; }
.sp-warlord img { width: 312px; height: auto; max-width: 100%; }
.sp-warden { background: #252e2f; }
.sp-warden img { width: 352px; height: auto; max-width: 100%; }
@media (min-width: 1200px) {
  .stage { height: 432px; }
  .sp-warlord img { width: 520px; }
  .sp-warden img { width: 528px; }
}
.feature-text .sprite-pair { justify-content: flex-start; margin-top: 24px; gap: 16px; }
.feature-text .sprite-pair .sp-char img { width: 192px; height: 162px; }
@media (max-width: 599px) { .feature-text .sprite-pair .sp-char img { width: 128px; height: 108px; } .feature-text .sprite-pair p { max-width: 132px; font-size: 13px; } }
.feature-text .sprite-pair { align-items: flex-end; }
.sp-hatch img { width: 240px; height: 240px; }
.sp-shutter img { width: 240px; height: 152px; }
@media (max-width: 599px) { .sp-hatch img { width: 160px; height: 160px; } }
.feature.solo { grid-template-columns: minmax(0, 1fr); } .feature.solo .feature-text { max-width: 72ch; }
.split.solo { grid-template-columns: minmax(0, 1fr); max-width: 72ch; }
/* 17 Nov fix (owner, 1920 px screen): the 16:9 art is shown from near its top (owner: "I want to see the sky"), so
   wide screens crop sky and ground evenly; the character stands on the art's own bottom edge */
.scene { bottom: auto; top: calc((100cqh - var(--sw) * .5625) * .15); }
/* the character stands on the hero's bottom edge, whole, at most 86 % of the hero's height (owner: show his whole body) */
.hero-art .char { bottom: 0; width: min(calc(.2453 * var(--sw)), calc(86cqh * 471 / 642)); }

/* owner's 0.9.0 announcement (17 Nov): six core changes as cards, key parts in gold */
.core-lead { font-weight: 700; color: var(--white); margin: 24px 0 16px; }
.core-cards .card b { color: var(--gold); font-weight: 700; }
.core-cards .card h3 { font: 32px/1 var(--head); color: var(--white); letter-spacing: 1px; margin-bottom: 12px; -webkit-font-smoothing: none; }
.lead b { color: var(--gold); }

.core-cards .media { margin: -24px -24px 16px; height: 190px; display: grid; place-items: center; overflow: hidden; background: #2c4b55; border-bottom: 2px solid var(--line); }
.core-cards .media img { max-height: 170px; width: auto; image-rendering: pixelated; }
.core-cards .media:has(.shotimg) { height: auto; }
.core-cards .media img.shotimg { width: 100%; height: auto; max-height: none; object-fit: contain; image-rendering: auto; display: block; } /* whole picture (owner, 24 Nov) */
@media (max-width: 599px) { .core-cards .media { margin: -16px -16px 12px; } }
/* press kit */
.press-facts div { grid-template-columns: 220px minmax(0, 1fr); }
@media (max-width: 599px) { .press-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.press-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; }
.press-grid li { background: var(--outline); border: 2px solid var(--line); clip-path: var(--notch); }
.press-grid img { display: block; width: 100%; height: auto; }
.press-grid span { display: block; padding: 8px 12px 12px; font-size: 14px; color: var(--soft); }
.press-grid.anims a, .press-grid.logos a { display: grid; place-items: center; height: 200px; background: #2c4b55; }
.press-grid.anims img, .press-grid.logos img { width: auto; max-width: 92%; max-height: 180px; image-rendering: pixelated; }
.code { overflow-x: auto; background: var(--outline); border: 2px solid var(--line); padding: 12px 16px; font: 13px Consolas, monospace; color: var(--soft); }
.core-cards .card .media img.px-big { width: 128px; height: 128px; max-height: none; }

.newitems { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin: 32px 0 0; padding: 16px; background: var(--panel); border: 2px solid var(--line); clip-path: var(--notch); }
.newitems img { image-rendering: pixelated; max-width: 100%; height: auto; display: block; }
.newitems p { flex: 1 1 220px; margin: 0; color: var(--soft); } .newitems b { color: var(--gold); }

/* 18 Nov (owner, phone): the hero box was cut in half by the screen edge and sat on the art like a half card.
   On phones the art is shorter and the panel is a clean full-width band below it (no box, no overlap), so the
   kicker, logo, text and the Steam button all fit on the first screen. */
@media (max-width: 599px) {
  .hero-art { height: clamp(220px, min(40svh, 72vw), 340px); }
  .hero-inner { margin-top: 0; padding-bottom: 32px; }
  .hero-panel { padding: 20px 0 0; background: none; border: 0; box-shadow: none; clip-path: none; max-width: none; }
  .hero-panel .kicker { margin-bottom: 14px; font-size: 12px; }
  .hero-panel h1 { margin-bottom: 12px; }
  .hero-panel h1 img { max-width: 340px; }
  .hero-panel .lead { font-size: 17px; line-height: 1.5; }
  .hero-panel .cta-row { margin-top: 18px; }
}

/* 2 Dec (owner): the 1.0 hero. The parallax is the 1.0 key art's own layers (sky, tower, rubble, front, the survivor
   and his dog; 460x214 art px) (no Mothership on the hero, owner 2 Dec).
   js/site.v6.js picks a WHOLE-NUMBER scale for every layer (pixel-perfect); without JS the art still covers the hero. */
.px-hero { background: #92645f; }
/* 2 Dec (owner, wide screens): every scene layer is a 920x214 box, the key art sits at x 230..690 of it; the 230 art px
   left of it continue Markus's ground and far ruins (mirrored at the art's own edge), the sky row colours run across
   the whole box, so a wide screen can show the WHOLE scene with no layer edge. Without JS the art still covers the hero. */
.px-hero .scene { aspect-ratio: 920 / 214; width: calc(2 * max(104cqw, calc(100cqh * 460 / 214))); top: auto; bottom: 0;
                  left: calc(-.5 * max(104cqw, calc(100cqh * 460 / 214))); }
.px-hero img.layer, .px-hero .char { image-rendering: pixelated; }
.px-hero .char { width: calc(86cqh * 136 / 205); height: auto; left: calc(var(--cx) - 43cqh * 136 / 205); }
/* the survivor box holds the open frame and the three blink frames stacked (js/site.v14.js flips visibility only) */
.px-hero .char { aspect-ratio: 136 / 205; }
.px-hero .char img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.px-hero .char img[data-frame] { visibility: hidden; }
/* owner, 2 Dec (phone): the hero art clips its own paint; on touch screens nothing moves (no parallax), so the layers
   are painted together instead of as separate compositor layers - the survivor/dog edge can't flicker on fast scrolls */
.px-hero { contain: paint; }
.px-hero.px-still .layer { will-change: auto; transform: none !important; }
.px-hero canvas.layer { image-rendering: pixelated; pointer-events: none; }

/* 2 Dec (owner: "AAA parallax, fog etc"): atmosphere on the same art-pixel grid as the key art.
   - fog bands (fog_far2 / fog_near2, 460x70 art px, tileable flat-shaded wisps in 3 alpha steps) between the layers, each with its own
     parallax depth; they drift left by ONE ART PIXEL per step (steps(460) over a 460-art-px tile), so they never blur
   - sun glow + god rays: drawn by js/site.v6.js at art resolution with an ordered (Bayer) dither, shown pixelated with
     screen blending; they "breathe" with opacity only (no filters, nothing resampled)
   - birds and dust/ember motes: canvases at art resolution, positions rounded to art pixels
   Everything pauses with .fx-paused (hero off screen or the tab hidden); prefers-reduced-motion: nothing moves. */
.px-hero .fog { overflow: hidden; pointer-events: none; }
/* the fog tile is 460 art px = 25 % of the 1840 px strip; one loop moves 920 art px (two tiles) in 920 one-art-px steps */
.px-hero .fog i { position: absolute; left: 0; width: 200%; height: calc(100% * 70 / 214); display: block;
                  background: url("../img/parallax10/fog_far2.png") 0 0 / 25% 100% repeat-x; image-rendering: pixelated;
                  will-change: transform; animation: fog-drift var(--fd, 600s) steps(920) infinite; }
.px-hero .fog-far i { top: calc(100% * 120 / 214); opacity: 1; --fd: 600s; }
.px-hero .fog-far i + i { top: calc(100% * 96 / 214); opacity: .4; --fd: 1040s; scale: 1 -1; animation-direction: reverse; }
.px-hero .fog-near i { top: calc(100% * 138 / 214); background-image: url("../img/parallax10/fog_near2.png"); opacity: .8; --fd: 320s; }
.px-hero .fog-near i + i { top: calc(100% * 132 / 214); background-image: url("../img/parallax10/fog_far2.png"); opacity: .35; --fd: 460s; scale: 1 -1; }
/* 2 Dec (owner): Markus's clouds as their own layer, drifting left steadily, ONE ART PIXEL per step (about 1.3 s).
   They wrap WITHIN his canvas: the tile is his 460 px cloud layer whose first and last 48 px fade out (img/parallax14),
   so a cloud leaving at the left fades out while it fades back in at the right - never two copies side by side, never a
   hard cut; nothing is drawn outside his canvas (the layer is masked to it, with a soft edge). */
.px-hero .clouds { overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 26.3%, #000 73.7%, transparent 75%);
          mask-image: linear-gradient(90deg, transparent 25%, #000 26.3%, #000 73.7%, transparent 75%); }
.px-hero .clouds i { position: absolute; left: 25%; top: 0; width: 200%; height: calc(100% * 160 / 214); display: block;
                     background: url("../img/parallax14/clouds.png") 0 0 / 25% 100% repeat-x; image-rendering: pixelated;
                     will-change: transform; animation: cloud-drift 600s steps(460) infinite; }
@keyframes cloud-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-25%, 0, 0); } }
/* owner, 2 Dec late: outside Markus's canvas only his sky's row colours run on; the ground and the lower scene fade
   into the page's dark bottom colour towards the side edges (behind the survivor, so he stays bright) */
.px-hero .edge-fade { pointer-events: none; display: none;
  background: linear-gradient(90deg, var(--outline) 0, var(--outline) 25%, rgba(13, 23, 25, 0) 30.4%,
                                     rgba(13, 23, 25, 0) 75.2%, var(--outline) 77%, var(--outline) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 48%, #000 80%);
          mask-image: linear-gradient(180deg, transparent 48%, #000 80%); }
/* owner, 2 Dec late: the art fills the whole width now - no fade or veil at its left edge */
/* owner, 2 Dec late: the art's left edge dissolves at EVERY height - a veil of the sky's own row colours lies over the
   sky part of the art (clouds, haze, rays, far ruins) and fades out over the canvas's first 50 art px, so nothing ends
   on a vertical line; it moves with the sky layer (same depth), so its rows always sit on the sky's rows */
.px-hero .sky-veil { display: none; pointer-events: none; background: url("../img/parallax11/sky.png") 0 0 / 100% 100% no-repeat; image-rendering: pixelated;
  -webkit-mask-image: linear-gradient(90deg, #000 25%, transparent 30.4%);
          mask-image: linear-gradient(90deg, #000 25%, transparent 30.4%); }
/* owner, 2 Dec late: the art fills the whole width now - no fade or veil at its left edge */
/* owner, 2 Dec (phone, flicker): touch screens draw the still scene into three plain canvases (sky | far ruins | ground,
   js/site.v16.js); the effects run between them on their own layers and freeze while the page scrolls */
.px-hero.px-static .scene > img { display: none !important; }
/* touch: no blend modes (the glow and rays lie on the sky with plain alpha); every effect freezes while the page scrolls */
.px-hero.px-still .fx-glow, .px-hero.px-still .fx-rays { mix-blend-mode: normal; }
.px-hero.px-scrolling .fog i, .px-hero.px-scrolling .clouds i, .px-hero.px-scrolling .fx-glow, .px-hero.px-scrolling .fx-rays { animation-play-state: paused; }
.px-hero .fx-static { display: none; }
.px-hero.px-static .fx-static { display: block; }
@keyframes fog-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
.px-hero .fx-glow, .px-hero .fx-rays { mix-blend-mode: screen; }
.px-hero .fx-glow { animation: sun-breathe 9s ease-in-out infinite alternate; }
.px-hero .fx-rays { opacity: .6; animation: rays-shift 13s ease-in-out infinite alternate; }   /* always visible, only breathing (owner, 2 Dec) */
@keyframes sun-breathe { from { opacity: .72; } to { opacity: 1; } }
@keyframes rays-shift { from { opacity: .6; } to { opacity: .95; } }
.px-hero .fx-motes, .px-hero .fx-birds { display: none; }
.px-hero.fx-on .fx-motes, .px-hero.fx-on .fx-birds { display: block; }
.px-hero.fx-on .fx-motes { position: absolute; inset: auto; }
.px-hero.fx-paused .fog i, .px-hero.fx-paused .clouds i, .px-hero.fx-paused .fx-glow, .px-hero.fx-paused .fx-rays { animation-play-state: paused; }
/* 2 Dec (owner, wide screens): the whole key art like the wallpaper - survivor and dog at their own spot on the left,
   the text panel up in the sky between the ruined house and the stone pillar (js/site.v13.js places both) */
.hero.px-wide .hero-inner { align-items: flex-start; padding-top: 72px; padding-bottom: 48px; }
/* grid (owner, 2 Dec evening): the panel ends where the header's Steam button ends; the survivor starts under the logo */
.hero.px-grid .hero-inner { justify-content: flex-end; align-items: center; padding-top: 48px; padding-bottom: 48px; }   /* owner, 2 Dec late: centred in the hero */
/* fit (1366 px): the panel stands between the ruined house and the low stone block, a little narrower */
.hero.px-fit .hero-inner { padding-top: 48px; padding-bottom: 32px; }
.hero.px-fit .hero-panel { padding: 24px; }
/* stack (small desktops): the whole art as a band (height set by js/site.v15.js), the panel centred below it */
.hero.px-stack .hero-art { position: relative; inset: auto; z-index: 0; }
.hero.px-stack .hero-inner { display: block; min-height: 0; padding-top: 32px; padding-bottom: 48px; }
/* owner, 2 Dec late: on tablets the panel no longer laps 40 px over the art, so it never covers the dog or the boots */
@media (max-width: 959px) { .hero-inner { margin-top: 0; } }
.hero.px-stack .hero-panel { max-width: 640px; margin-left: auto; margin-right: 0; }   /* ends where the Steam button ends */
.hero.px-wide .hero-panel { position: relative; }
.hero.px-wide .scrim { background: linear-gradient(0deg, var(--outline) 0, rgba(19, 33, 36, .55) 5%, rgba(19, 33, 36, 0) 16%); }
@media (prefers-reduced-motion: reduce) {
  .px-hero .fog i, .px-hero .clouds i, .px-hero .fx-glow, .px-hero .fx-rays { animation: none; }
  .px-hero .fx-rays { opacity: .45; }
  .px-hero.fx-on .fx-motes, .px-hero.fx-on .fx-birds { display: none; }
}

/* Back to top (owner, 2 Dec): the site's own button look, bottom right */
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
          z-index: 50; width: 44px; height: 44px; display: grid; place-items: center; text-decoration: none;
          background: #fcca2a; color: #13211f; border: 2px solid #13211f; box-shadow: 0 4px 0 #8a6a12;
          font: 700 16px/1 system-ui, sans-serif; opacity: 0; transform: translateY(12px); pointer-events: none;
          transition: opacity .2s, transform .2s; }
.to-top.on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #ffd84d; }
.to-top:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a6a12; }
.to-top:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

