/* =====================================================================
   Ungodly EDF: World Brothers mods website
   Colours are taken from the universal Ungodly menu itself:
   brick title bar #8c1f14, rust tabs #9e331a, amber checks #ffb313, running dots #66db66.
   Type: Big Shoulders Stencil Display (EDF military stencil) for page titles,
   Atkinson Hyperlegible (unambiguous l / I / 1 in file names) for reading,
   JetBrains Mono only for paths, commands and log lines.
   ===================================================================== */

@font-face { font-family: "Big Shoulders Stencil Display"; src: url("../fonts/big-shoulders-stencil-display-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Big Shoulders Stencil Display"; src: url("../fonts/big-shoulders-stencil-display-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #15191f;
  --bg-deep: #0f1216;
  --surface: #1b2028;
  --surface-2: #232a34;
  --line: #2f3743;
  --line-strong: #3d4756;
  --text: #e9ebee;
  --text-2: #c6cbd2;
  --muted: #9aa3af;

  --brick: #8c1f14;
  --brick-hi: #a42a1b;
  --brick-edge: #b4441f;
  --brick-deep: #5e1300;
  --brick-shadow: #3d0c06;
  --rust: #9e331a;
  --ember: #ff8f73;
  --amber: #ffb313;
  --green: #66db66;
  --sky: #6cb4ff;
  --sky-hi: #a3d0ff;
  --danger: #ff7a66;

  --font-display: "Big Shoulders Stencil Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, "Cascadia Mono", "Courier New", monospace;

  --wrap: 1180px;
  --gutter: 16px;
  --topbar-h: 66px;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 20px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

body.viewer-open { overflow: hidden; }

main { display: block; padding-bottom: 80px; }
main:has(> .band:last-child) { padding-bottom: 0; }
main > .band:last-child { border-bottom: 0; }

img, svg, picture { max-width: 100%; }
img { height: auto; }

a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--sky-hi); }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
main:focus { outline: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
h1, h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: .005em; text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
h4 { font-size: 1.05rem; font-weight: 700; }

p, ul, ol, dl, table, figure, pre { margin: 0; }
strong { font-weight: 700; color: var(--text); }

code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .06em .36em;
  overflow-wrap: break-word;
  color: #f0e6d2;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--amber); color: #111; font-weight: 700;
  padding: 10px 14px; border-radius: 3px; text-decoration: none;
}
.skip:focus { top: 12px; color: #111; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.prose > * + * { margin-top: 1rem; }
.prose { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35rem; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(21, 25, 31, .94);
  border-bottom: 1px solid var(--line);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar { background: rgba(21, 25, 31, .82); -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px); }
}
.topbar__inner {
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  display: flex; align-items: center; gap: 24px;
  min-height: var(--topbar-h);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.brand:hover { color: var(--text); }
.brand__cube { flex: none; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-family: var(--font-display); font-weight: 900; font-size: 1.75rem; line-height: .9; letter-spacing: .02em; }
.brand__sub { font-size: .76rem; color: var(--muted); line-height: 1.2; margin-top: 2px; }

.nav { margin-left: auto; min-width: 0; }
.nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: block; padding: 8px 12px;
  color: var(--text-2); text-decoration: none; font-size: .95rem; white-space: nowrap;
  border-radius: 3px;
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link[aria-current="page"] { color: #fff; background: #2a1712; box-shadow: inset 0 -3px 0 var(--rust); }

@media (max-width: 940px) {
  .topbar__inner { flex-wrap: wrap; gap: 4px 16px; padding-top: 8px; }
  .nav { margin-left: 0; width: 100%; }
  .nav__list {
    overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .nav__list li:last-child { padding-right: 32px; }
  html { scroll-padding-top: 130px; }
}

/* ---------------------------------------------------------------- buttons, keys */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  font: 700 1rem/1.2 var(--font-body);
  color: #fff; background: var(--brick);
  border: 1px solid var(--brick-edge); border-radius: 4px;
  box-shadow: 0 4px 0 var(--brick-shadow);
  text-decoration: none; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s ease;
}
.btn:hover { background: var(--brick-hi); color: #fff; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brick-shadow); }
.btn__meta { font-weight: 400; opacity: .85; font-size: .9rem; }
.btn--ghost { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); box-shadow: 0 4px 0 #0a0c0f; }
.btn--ghost:hover { background: #2c3440; color: var(--text); }
.btn--ghost:active { box-shadow: 0 1px 0 #0a0c0f; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.linkbtn {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: var(--sky); text-decoration: underline; text-underline-offset: .18em; cursor: pointer;
}
.linkbtn:hover { color: var(--sky-hi); }

.key {
  display: inline-block;
  min-width: 2.15em;
  padding: .1em .45em .16em;
  font: 700 .8em/1.3 var(--font-body);
  color: #f1f3f6; text-align: center; white-space: nowrap;
  background: linear-gradient(#3c4553, #2a313c);
  border: 1px solid #4d5768; border-bottom-color: #1a1f26; border-radius: 3px;
  box-shadow: 0 3px 0 #0a0c0f, inset 0 1px 0 rgba(255, 255, 255, .14);
  vertical-align: .1em;
  margin-bottom: 3px;
}

/* ---------------------------------------------------------------- page sections */

.section { padding-block: clamp(48px, 7vw, 88px); }
.section + .section { border-top: 1px solid var(--line); }
.section__head { display: grid; gap: 12px; margin-bottom: 32px; max-width: 70ch; }
.section__head h2 { font-size: clamp(2.1rem, 1.3rem + 2.4vw, 3rem); line-height: 1; }
.section__head p { color: var(--text-2); font-size: 1.1rem; }
.section__title { font-size: clamp(2.1rem, 1.3rem + 2.4vw, 3rem); line-height: 1; }
.contents-note { margin-top: 16px; }
.help__more { margin-top: 48px; }

.pagehead { padding-block: clamp(36px, 6vw, 64px) 32px; border-bottom: 1px solid var(--line); }
.pagehead h1 { font-weight: 900; font-size: clamp(2.7rem, 1.6rem + 4.2vw, 4.8rem); line-height: .95; max-width: 18ch; }
.pagehead__lede { margin-top: 18px; font-size: 1.18rem; color: var(--text-2); max-width: 64ch; }
.pagehead__part { display: inline-block; margin-bottom: 12px; font-weight: 700; color: var(--ember); }

.factbar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px; margin-top: 28px;
  background: var(--line); border: 1px solid var(--line);
}
.factbar > div { background: var(--surface); padding: 14px 16px; }
.factbar dt { font-size: .82rem; color: var(--muted); }
.factbar dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- hero (home) */

.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(40px, 6vw, 80px) clamp(48px, 7vw, 92px);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Crect x='3' y='3' width='12' height='12' rx='1' fill='%234ea8ff' fill-opacity='0.10'/%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(ellipse 60% 75% at 78% 45%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 75% at 78% 45%, #000 0%, transparent 72%);
}
.hero__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.hero h1 {
  font-weight: 900;
  font-size: clamp(3.1rem, 1.6rem + 5.6vw, 6.3rem);
  line-height: .88;
  letter-spacing: .01em;
}
.hero h1 .hero__h1-sub { display: block; color: var(--ember); }
.hero__lede { margin-top: 22px; font-size: 1.2rem; color: var(--text-2); max-width: 46ch; }
.hero .btn-row { margin-top: 30px; }
.hero__by { margin-top: 20px; font-size: .92rem; color: var(--muted); }

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- menu replica */

.uwin {
  background: #101112; color: #c9cacb;
  border: 1px solid #2c2e31;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .6);
  font-size: .9rem; line-height: 1.45;
  font-variant-numeric: normal;
}
.uwin__title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--brick); color: #fff;
  padding: 6px 10px; font-size: .74rem; letter-spacing: .03em;
}
.uwin__title span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uwin__x { flex: none; width: 12px; height: 12px; }
.uwin__body { display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 392px; }
.uwin__list { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; background: #131415; border-right: 1px solid #232425; }
.uwin__item {
  display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 9px;
  text-align: left; padding: 6px 8px;
  background: transparent; border: 0; border-radius: 2px;
  color: #ececec; font: inherit; cursor: pointer;
}
.uwin__item:hover { background: #26130f; }
.uwin__item[aria-selected="true"] { background: #5e1300; }
.uwin__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); margin-top: .5em; }
.uwin__name { font-size: .88rem; }
.uwin__state { grid-column: 2; font-size: .76rem; color: #9b9c9d; }
.uwin__foot { margin-top: auto; padding: 10px 8px 4px; border-top: 1px solid #232425; font-size: .74rem; color: #8d8e8f; }
.uwin__page { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; min-width: 0; }
.uwin__page[hidden] { display: none; }
.uwin__head { font-size: .86rem; color: #9b9c9d; }
.uwin__head b { color: var(--green); font-weight: 400; }
.uwin__check { display: flex; align-items: flex-start; gap: 8px; font-size: .84rem; color: #e7e7e7; }
.uwin__check small { color: #9b9c9d; font-size: .8rem; }
.uwin__box { flex: none; width: 18px; height: 18px; display: grid; place-items: center; background: #24324a; border: 1px solid #3c4d6c; }
.uwin__tabs { display: flex; flex-wrap: wrap; gap: 3px; padding-bottom: 6px; border-bottom: 1px solid #6e2412; }
.uwin__tab { background: #4d1f14; color: #e9dcd8; font-size: .76rem; padding: 2px 7px; }
.uwin__tab:first-child { background: var(--rust); color: #fff; }
.uwin__about { font-size: .88rem; color: #cfd0d1; }
.uwin__about strong { color: #fff; font-weight: 400; }
.uwin__hint { margin-top: auto; padding-top: 8px; border-top: 1px solid #232425; font-size: .82rem; color: #a7a8a9; }

.keypad { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; margin-top: 18px; }
.keypad__label { font-size: .9rem; color: var(--muted); margin-right: 6px; }
.keypad .key { font-size: 1rem; cursor: pointer; padding: .3em .6em .36em; }
.keypad .key:hover { background: linear-gradient(#475163, #313946); }
.keypad .key[aria-pressed="true"] { background: linear-gradient(#a42a1b, #8c1f14); border-color: var(--brick-edge); border-bottom-color: #4a0f08; box-shadow: 0 3px 0 #3d0c06, inset 0 1px 0 rgba(255, 255, 255, .18); }

@media (prefers-reduced-motion: no-preference) {
  .js .uwin__dot { animation: uwin-start .5s ease-out both; }
  .js .uwin__item:nth-child(1) .uwin__dot { animation-delay: .25s; }
  .js .uwin__item:nth-child(2) .uwin__dot { animation-delay: .4s; }
  .js .uwin__item:nth-child(3) .uwin__dot { animation-delay: .55s; }
  .js .uwin__item:nth-child(4) .uwin__dot { animation-delay: .7s; }
  .js .uwin__item:nth-child(5) .uwin__dot { animation-delay: .85s; }
  .js .uwin__item:nth-child(6) .uwin__dot { animation-delay: 1s; }
  .js .uwin__item:nth-child(7) .uwin__dot { animation-delay: 1.15s; }
}
@keyframes uwin-start {
  from { background: #5d5f62; box-shadow: none; }
  60% { background: #9cf59c; box-shadow: 0 0 0 4px rgba(102, 219, 102, .18); }
  to { background: var(--green); box-shadow: none; }
}

@media (max-width: 640px) {
  .uwin__body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .uwin__list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #232425; padding: 6px; }
  .uwin__item { flex: none; min-width: 150px; }
  .uwin__foot { display: none; }
  .uwin__title span:first-child { font-size: .68rem; }
}

/* ---------------------------------------------------------------- install track (home) */

.track { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: track; }
.track__step { position: relative; padding-top: 22px; border-top: 3px solid var(--line-strong); }
.track__step:first-child { border-top-color: var(--brick); }
.track__num {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px;
  font: 900 1.8rem/1 var(--font-display); color: #fff;
  background: var(--brick); border: 1px solid var(--brick-edge); box-shadow: 0 4px 0 var(--brick-shadow);
}
.track__step h3 { font-size: 1.3rem; }
.track__step p { margin-top: 8px; color: var(--text-2); }
.track__step a { display: inline-block; margin-top: 12px; font-weight: 700; }
@media (max-width: 820px) { .track { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- mod list (home) */

.modlist { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.modrow {
  display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 4px 18px;
  padding: 16px 8px; border-bottom: 1px solid var(--line);
  color: var(--text); text-decoration: none;
}
.modrow:hover { background: var(--surface); color: var(--text); }
.modrow .key { font-size: 1.05rem; justify-self: start; }
.modrow__name { font-weight: 700; font-size: 1.1rem; }
.modrow__line { display: block; color: var(--muted); font-size: .97rem; font-weight: 400; }
.modrow__ver { color: var(--muted); font-size: .92rem; white-space: nowrap; }
@media (max-width: 560px) {
  .modrow { grid-template-columns: 58px minmax(0, 1fr); }
  .modrow__ver { grid-column: 2; }
}

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }

.needs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 0 40px; max-width: 980px; }
.needs li { padding: 12px 0 12px 26px; border-bottom: 1px solid var(--line); position: relative; }
.needs li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 10px; height: 10px; background: var(--brick); box-shadow: 2px 2px 0 var(--brick-shadow); }

/* ---------------------------------------------------------------- download band */

.band { background: var(--bg-deep); border-block: 1px solid var(--line); }
.band__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .band__grid { grid-template-columns: minmax(0, 1fr); } }

.pledge {
  border-left: 3px solid var(--green);
  background: rgba(102, 219, 102, .06);
  padding: 14px 18px;
}
.pledge p + p { margin-top: 8px; }
.pledge__sig { color: var(--muted); font-size: .92rem; }

/* ---------------------------------------------------------------- guide layout */

.guide { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; padding-block: 40px 24px; }
.guide__main { min-width: 0; max-width: 820px; }
@media (max-width: 1000px) {
  .guide { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

.rail { position: sticky; top: calc(var(--topbar-h) + 24px); max-height: calc(100vh - var(--topbar-h) - 40px); overflow-y: auto; }
@media (max-width: 1000px) { .rail { position: static; max-height: none; } }
.rail__inner { border-left: 3px solid var(--brick); padding-left: 16px; }
.rail__title { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; line-height: 1; margin-bottom: 14px; }
.rail__toc summary { cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--text-2); }
.rail__toc summary::marker { color: var(--ember); }

.progress { margin-bottom: 16px; }
.progress__bar { height: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.progress__fill { display: block; height: 100%; width: 0; background: var(--amber); transition: width .25s ease; }
.progress__text { margin-top: 6px; font-size: .86rem; color: var(--muted); }
.progress__text .linkbtn { margin-left: 6px; font-size: .86rem; }

.toc { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: toc; }
.toc a { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; color: var(--text-2); text-decoration: none; font-size: .93rem; line-height: 1.35; }
.toc a:hover { color: var(--text); }
.toc__step a::before { counter-increment: toc; content: counter(toc); flex: none; width: 1.4em; font: 800 1.05rem/1 var(--font-display); color: var(--muted); text-align: right; }
.toc__extra a { padding-left: calc(1.4em + 10px); }
.toc a[aria-current="true"] { color: #fff; font-weight: 700; }
.toc a[aria-current="true"]::before { color: var(--amber); }
.toc a.is-done::after { content: ""; flex: none; width: 6px; height: 11px; margin-left: 4px; border: solid var(--green); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }

/* ---------------------------------------------------------------- steps */

.step + .step { margin-top: 44px; padding-top: 44px; border-top: 1px solid var(--line); }
.steps-end { margin-top: 44px; padding-top: 44px; border-top: 1px solid var(--line); }
.steps-end.prose { max-width: none; }
.steps-end > p, .steps-end > ul, .steps-end > ol { max-width: 68ch; }
.step__head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-bottom: 20px; }
.step__num {
  display: grid; place-items: center; width: 56px; height: 56px;
  font: 900 2rem/1 var(--font-display); color: #fff;
  background: var(--brick); border: 1px solid var(--brick-edge); box-shadow: 0 5px 0 var(--brick-shadow);
  transition: background-color .2s ease;
}
.step.is-done .step__num { background: #2b5c2b; border-color: #3f8a3f; box-shadow: 0 5px 0 #133013; }
.step__title { font-family: var(--font-body); font-weight: 700; font-size: clamp(1.3rem, 1.05rem + .9vw, 1.65rem); line-height: 1.25; letter-spacing: 0; }
.step__optional { display: inline-block; vertical-align: .2em; margin-left: 6px; padding: 1px 8px; font-size: .78rem; font-weight: 700; color: var(--bg); background: var(--muted); border-radius: 2px; }
.step__done {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
  font-size: .92rem; color: var(--text-2); cursor: pointer; user-select: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 3px;
}
.step__done:hover { border-color: var(--line-strong); color: var(--text); }
.step__done input { width: 18px; height: 18px; margin: 0; accent-color: var(--amber); cursor: pointer; }
.step.is-done .step__done { border-color: #3f8a3f; color: var(--green); }
.step__body { padding-left: 72px; }
.step__body > * + * { margin-top: 1.1rem; }
.step__body > p { max-width: 68ch; }
.step__body ul, .step__body ol { padding-left: 1.4em; }
.step__body li + li { margin-top: .4rem; }
@media (max-width: 640px) {
  .step__head { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; }
  .step__num { width: 46px; height: 46px; font-size: 1.6rem; }
  .step__done { grid-column: 1 / -1; justify-self: start; }
  .step__body { padding-left: 0; }
}

ol.do { list-style: none; padding-left: 0; counter-reset: do; }
ol.do > li { position: relative; padding-left: 38px; counter-increment: do; }
ol.do > li + li { margin-top: .75rem; }
ol.do > li::before {
  content: counter(do); position: absolute; left: 0; top: .1em;
  width: 26px; height: 26px; display: grid; place-items: center;
  font: 800 1rem/1 var(--font-display); color: var(--ember);
  border: 1px solid var(--line-strong); background: var(--surface);
}

.subhead { font-size: 1.45rem; margin-top: 2.2rem !important; }

/* ---------------------------------------------------------------- callouts */

.callout { --c: var(--sky); border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--surface); padding: 14px 18px; }
.callout__title { font-weight: 700; color: var(--c); }
.callout__body { margin-top: 4px; color: var(--text-2); }
.callout__body > * + * { margin-top: .6rem; }
.callout__body ul { padding-left: 1.3em; }
.callout--tip { --c: var(--green); }
.callout--verified { --c: var(--green); background: rgba(102, 219, 102, .05); }
.callout--important { --c: var(--amber); background: rgba(255, 179, 19, .05); }
.callout--warning { --c: var(--danger); background: rgba(255, 122, 102, .06); }

/* ---------------------------------------------------------------- copy lines, code */

.copyline { display: flex; align-items: stretch; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.copyline__label { display: flex; align-items: center; padding: 9px 12px; font-size: .84rem; color: var(--muted); background: var(--surface); border-right: 1px solid var(--line); white-space: nowrap; }
.copyline__text { flex: 1; min-width: 0; padding: 9px 12px; font-size: .88rem; line-height: 1.5; background: none; border: 0; border-radius: 0; overflow-wrap: anywhere; color: #f0e6d2; }
.copyline--hash .copyline__text { letter-spacing: .02em; }
.copybtn {
  flex: none; min-width: 74px; padding: 0 14px;
  font: 700 .85rem/1 var(--font-body); color: var(--text-2);
  background: var(--surface); border: 0; border-left: 1px solid var(--line); cursor: pointer;
}
.copybtn:hover { background: var(--surface-2); color: var(--text); }
.copybtn.is-copied { color: var(--green); }
@media (max-width: 560px) {
  .copyline { flex-wrap: wrap; }
  .copyline__label { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .copyline__text { flex-basis: 0; }
}
.copylines > * + * { margin-top: 8px; }
.copylines .copyline__label { width: 13.5em; white-space: normal; }
@media (max-width: 560px) { .copylines .copyline__label { width: 100%; } }

.codeblock { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.codeblock__bar { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.codeblock__caption { padding: 8px 12px; font-size: .84rem; color: var(--muted); }
.codeblock pre { padding: 14px 16px; overflow-x: auto; font: 400 .86rem/1.65 var(--font-mono); color: #e1e5ea; }
.codeblock pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }
.codeblock .copybtn { padding: 8px 14px; }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-2); color: var(--text-2); font-size: .86rem; font-weight: 700; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 700; color: var(--text); }
td code, th code { overflow-wrap: break-word; }
.table--compact th, .table--compact td { padding: 7px 12px; }
.num { text-align: right; white-space: nowrap; }
.yes { color: var(--green); font-weight: 700; }

/* ---------------------------------------------------------------- screenshots */

.shot { margin-block: 1.6rem; }
.shot__link {
  position: relative; display: inline-block; max-width: 100%; vertical-align: top;
  border: 1px solid var(--line-strong); background: #0b0d10; cursor: zoom-in;
}
.shot__link img { display: block; width: auto; max-width: 100%; height: auto; }
.shot__hint {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  font-size: .8rem; font-weight: 700; color: #fff;
  background: rgba(15, 18, 22, .88); border: 1px solid rgba(255, 255, 255, .2); border-radius: 3px;
}
.shot__link:hover .shot__hint, .shot__link:focus-visible .shot__hint { background: var(--brick); border-color: var(--brick-edge); }
.shot figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); max-width: 80ch; }
.shot__note { display: block; margin-top: 2px; }

/* ---------------------------------------------------------------- full-size viewer */

.viewer {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(8, 10, 13, .97); color: var(--text);
}
@supports (height: 100dvh) { .viewer { height: 100dvh; } }
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: rgba(0, 0, 0, .75); }
.viewer__bar {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  padding: 10px 16px; background: #12151a; border-bottom: 1px solid var(--line);
}
.viewer__info { min-width: 0; }
.viewer__title { font-weight: 700; }
.viewer__meta { font-size: .85rem; color: var(--muted); }
.viewer__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.viewer__btn {
  display: inline-flex; align-items: center; padding: 8px 12px;
  font: 700 .88rem/1.2 var(--font-body); color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 3px; cursor: pointer;
}
.viewer__btn:hover { background: var(--surface-2); color: #fff; }
.viewer__btn[aria-pressed="true"] { background: var(--brick); border-color: var(--brick-edge); color: #fff; }
.viewer__btn--close { background: #2a1712; }
.viewer__stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; overflow: auto; overscroll-behavior: contain; }
.viewer__img { flex: none; display: block; margin: auto; max-width: none; height: auto; user-select: none; -webkit-user-drag: none; }
.viewer[data-mode="actual"] .viewer__stage { cursor: grab; }
.viewer[data-mode="actual"] .viewer__stage.is-dragging { cursor: grabbing; }
.viewer[data-mode="fit"] .viewer__stage { overflow: hidden; cursor: zoom-in; padding: 12px; }
.viewer[data-mode="fit"] .viewer__img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; }
.viewer__status { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; padding: 0 12px; color: var(--muted); font-size: .9rem; pointer-events: none; }
.viewer__status:empty { display: none; }

/* ---------------------------------------------------------------- features page */

.hotkeys { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; list-style: none; padding: 0; }
.hotkeys a { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem; }
.hotkeys a:hover { border-color: var(--line-strong); background: var(--surface-2); color: #fff; }

.modsec { margin-top: 56px; border: 1px solid var(--line); background: var(--surface); scroll-margin-top: calc(var(--topbar-h) + 16px); }
.modsec__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px; background: var(--brick); color: #fff; }
.modsec__bar h2 { font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.5rem); line-height: 1; }
.modsec__bar .key { font-size: 1.05rem; }
.modsec__ver { font-weight: 700; color: #ffd9cf; margin-left: 4px; font-size: 1rem; font-family: var(--font-body); letter-spacing: 0; }
.modsec__keys { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.modsec__body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr); gap: 32px; padding: 26px 24px 28px; }
.modsec__main > * + * { margin-top: 1.1rem; }
.modsec__lede { font-size: 1.16rem; color: var(--text); }
.modsec__side > * + * { margin-top: 18px; }
@media (max-width: 900px) { .modsec__body { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 22px; } }

.featurelist { list-style: none; padding: 0; margin: 0; }
.featurelist li { position: relative; padding-left: 22px; }
.featurelist li + li { margin-top: .7rem; }
.featurelist li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 9px; background: var(--rust); box-shadow: 2px 2px 0 var(--brick-shadow); }

.facts { background: var(--bg-deep); border: 1px solid var(--line); padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; font-size: .93rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts code { font-size: .8rem; }

.tryfirst { border-top: 1px solid var(--line); padding-top: 14px; }
.tryfirst h3 { font-size: 1.05rem; margin-bottom: 6px; }
.tryfirst ul { padding-left: 1.2em; color: var(--text-2); font-size: .97rem; }
.tryfirst li + li { margin-top: .35rem; }

.online { border-left: 3px solid var(--sky); padding: 10px 14px; background: rgba(108, 180, 255, .06); color: var(--text-2); }
.online strong { color: var(--sky-hi); }

/* ---------------------------------------------------------------- downloads page */

.dlgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .dlgrid { grid-template-columns: minmax(0, 1fr); } }
.dlcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); }
.dlcard__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--brick); color: #fff; font-weight: 700; }
.dlcard__bar small { font-weight: 400; color: #ffd9cf; }
.dlcard__body { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.dlcard__body .btn { align-self: flex-start; }
.dlcard__count { font-size: .88rem; color: var(--muted); }
.hash { font-family: var(--font-mono); font-size: .86rem; color: #f0e6d2; word-spacing: .25em; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- file tree */

.tree { list-style: none; margin: 0; padding-left: 18px; border-left: 1px dashed var(--line-strong); font-size: .93rem; }
.treebox { background: var(--bg-deep); border: 1px solid var(--line); padding: 14px 16px; }
.treebox > .tree { border-left: 0; padding-left: 0; }
.tree li { margin: 3px 0; }
.tree summary { cursor: pointer; }
.tree__name { font-family: var(--font-mono); font-size: .88rem; color: var(--text); overflow-wrap: anywhere; }
.tree__dir > details > summary .tree__name { color: #ffd38a; }
.tree__dir--ungodly > details > summary .tree__name { color: var(--ember); font-weight: 600; }
.tree__meta { margin-left: 10px; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.tree__file { padding-left: 14px; }

/* ---------------------------------------------------------------- help / faq */

.faq { border-bottom: 1px solid var(--line); }
.faq:first-of-type { border-top: 1px solid var(--line); }
.faq > summary {
  position: relative; cursor: pointer; list-style: none;
  padding: 16px 44px 16px 0; font-weight: 700; font-size: 1.08rem;
}
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after { content: "+"; position: absolute; right: 10px; top: 8px; font: 900 1.9rem/1 var(--font-display); color: var(--ember); }
.faq[open] > summary::after { content: "\2013"; }
.faq > summary:hover { color: #fff; }
.faq__body { padding: 0 0 22px; max-width: 74ch; color: var(--text-2); }
.faq__body > * + * { margin-top: .8rem; }
.faq__body ul, .faq__body ol { padding-left: 1.35em; }
.faq__body li + li { margin-top: .35rem; }
.faqgroup + .faqgroup { margin-top: 48px; }
.faqgroup > h2 { font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.5rem); margin-bottom: 16px; }

/* ---------------------------------------------------------------- pager, licenses, misc */

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.pager__link { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pager__link:hover { border-color: var(--line-strong); background: var(--surface-2); color: #fff; }
.pager__link--next { text-align: right; grid-column: 2; }
.pager__dir { font-size: .85rem; color: var(--muted); }
.pager__title { font-weight: 700; font-size: 1.1rem; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager__link--next { grid-column: auto; } }

.license { margin-top: 12px; }
.license summary { cursor: pointer; font-weight: 700; color: var(--sky); }
.license pre { margin-top: 10px; max-height: 360px; overflow: auto; padding: 14px 16px; background: var(--bg-deep); border: 1px solid var(--line); font: 400 .8rem/1.55 var(--font-mono); color: var(--text-2); white-space: pre-wrap; }

.credits { list-style: none; padding: 0; margin: 0; }
.credits > li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.credits > li:first-child { border-top: 1px solid var(--line); }
.credits h3 { font-size: 1.15rem; }
.credits p { margin-top: 4px; color: var(--text-2); max-width: 75ch; }
.credits ul.prose { max-width: 75ch; }

.notfound { padding-block: 96px; }
.notfound h1 { font-weight: 900; font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: .95; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.panel { background: var(--surface); border: 1px solid var(--line); padding: 18px 20px; }
.panel > * + * { margin-top: .75rem; }
.panel h3 { font-size: 1.15rem; }

/* ---------------------------------------------------------------- footer */

.footer { margin-top: 0; background: var(--bg-deep); border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.footer__inner { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding-block: 40px 52px; }
.footer__name { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.footer__brand p + p { margin-top: 8px; }
.footer__legal { font-size: .85rem; }
.footer__head { font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li + li { margin-top: 4px; }
.footer a { color: var(--text-2); }
.footer a:hover { color: #fff; }
@media (max-width: 820px) { .footer__inner { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* ---------------------------------------------------------------- motion & print */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  :root { --text: #000; --text-2: #222; --muted: #444; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .rail, .footer, .step__done, .copybtn, .shot__hint, .keypad, .uwin, .pager, .skip, .viewer, .btn { display: none !important; }
  a { color: #000; }
  .guide { display: block; padding: 0; }
  .step__body { padding-left: 0; }
  .step + .step { break-before: auto; }
  .step__num { color: #000; background: #fff; box-shadow: none; border: 2px solid #000; }
  code, .copyline, .codeblock, .codeblock pre, .table-wrap, .callout, .facts, .treebox, .panel, .modsec { background: #fff !important; color: #000 !important; border-color: #999 !important; }
  .copyline__text, .codeblock pre { color: #000; }
  .modsec__bar, .dlcard__bar { background: #eee; color: #000; }
  h1, h2, h3 { color: #000; }
  .shot__link { border-color: #999; }
}
