/* ==========================================================================
   Ungodly Beach Invasion 1944 AI — installation guide
   Palette pulled from the game itself: channel fog, wet sand, gun-metal
   silhouette, and a single amber signal colour for anything actionable.
   ========================================================================== */

:root {
    /* Surfaces */
    --fog:        #E7EAEB;
    --fog-2:      #DDE2E4;
    --fog-3:      #D0D7DA;
    --paper:      #F3F5F5;

    /* Ink */
    --ink:        #0D1317;
    --ink-2:      #35434C;
    --ink-3:      #5D6D77;

    /* Dark panels — the "embrasure" */
    --hull:       #0D1317;
    --hull-2:     #16212A;
    --hull-3:     #223039;
    --hull-line:  #2E3E49;
    --surf:       #C4CDD2;
    --surf-dim:   #8B9AA3;

    /* Signals */
    --amber:      #E8A33D;
    --amber-deep: #B87A1C;
    --amber-wash: #FBEFD8;
    --sand:       #B9A87F;
    --rust:       #A8412B;
    --rust-wash:  #F7E4DF;
    --verdi:      #3F7D63;
    --verdi-wash: #E0EEE7;
    --sky:        #62808F;
    --sky-wash:   #E1E9ED;

    /* Type */
    --display: "Barlow Condensed", "Oswald", "Arial Narrow", sans-serif;
    --body:    "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --mono:    "IBM Plex Mono", "Consolas", "SFMono-Regular", monospace;

    /* Metrics */
    --wrap:  1180px;
    --wrap-narrow: 800px;
    --r:     3px;
    --shadow:      0 1px 2px rgba(13,19,23,.10), 0 8px 24px -12px rgba(13,19,23,.25);
    --shadow-deep: 0 24px 60px -24px rgba(13,19,23,.55);
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
    margin: 0;
    background: var(--fog);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.62;
    font-feature-settings: "kern", "liga";
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration-color: rgba(13,19,23,.3); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--amber-deep); }

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

code, pre, kbd { font-family: var(--mono); }

code {
    font-size: .87em;
    background: var(--fog-3);
    padding: .1em .38em;
    border-radius: 2px;
    overflow-wrap: anywhere;
}

/* Grid children default to min-width:auto, so a long unbreakable Windows path
   inside one can force its whole track wider than the viewport. */
.step > *, .sub > *, .grid-2 > *, .grid-3 > *, .mf > *, .sec > *, .dl > * { min-width: 0; }

kbd {
    font-size: .8em;
    background: var(--hull-2);
    color: var(--surf);
    padding: .18em .5em;
    border-radius: 3px;
    border-bottom: 2px solid #000;
    white-space: nowrap;
}

hr { border: 0; border-top: 1px solid var(--fog-3); margin: 3rem 0; }

.skip {
    position: absolute; left: -9999px;
    background: var(--hull); color: var(--surf);
    padding: .7rem 1.1rem; z-index: 200;
}
.skip:focus { left: .6rem; top: .6rem; }

/* --------------------------------------------------------------------------
   Type primitives
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.005em;
    margin: 0;
    text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.18rem; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
    font-family: var(--mono);
    font-size: .69rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--amber-deep);
    margin: 0 0 .65rem;
}
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 16px; height: 2px;
    background: var(--amber);
    vertical-align: .3em;
    margin-right: .55rem;
}

.lede { font-size: 1.16rem; color: var(--ink-2); }

.anchor { text-decoration: none; color: inherit; }
.anchor::after {
    content: "#";
    font-family: var(--mono);
    font-size: .5em;
    color: var(--fog-3);
    margin-left: .45rem;
    vertical-align: .45em;
}
.anchor:hover::after { color: var(--amber-deep); }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }

.band { padding: clamp(3.2rem, 7vw, 5.6rem) 0; }
.band--tight { padding: clamp(2.2rem, 4vw, 3.2rem) 0; }
.band--dark { background: var(--hull); color: var(--surf); }
.band--paper { background: var(--paper); }
.band--rule { border-top: 1px solid var(--fog-3); }

/* Two plain sections in a row would otherwise stack their padding into a gap
   twice the intended size. Only collapse where the background does not change. */
.band--tight + .band--tight:not(.band--paper):not(.band--dark):not(.band--rule) {
    padding-top: 0;
}

.band--dark h2, .band--dark h3 { color: #fff; }
.band--dark .eyebrow { color: var(--amber); }
.band--dark .lede { color: var(--surf-dim); }
.band--dark a { color: var(--amber); }

.grid-2 { display: grid; gap: clamp(1.6rem, 3vw, 2.8rem); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }

.shead { max-width: 62ch; margin-bottom: 2.2rem; }
.shead__title { margin-bottom: .7rem; }
.shead__lede { font-size: 1.1rem; color: var(--ink-2); margin: 0; }
.band--dark .shead__lede { color: var(--surf-dim); }

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
    position: sticky; top: 0; z-index: 90;
    background: rgba(13,19,23,.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--hull-line);
    color: var(--surf);
}

.masthead__inner {
    width: min(100% - 2.5rem, var(--wrap));
    margin-inline: auto;
    display: flex; align-items: center; gap: 1.5rem;
    min-height: 60px;
}

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; padding: .5rem 0; margin-right: auto; }
.brand__mark { color: var(--amber); display: flex; }
.brand__name {
    display: block;
    font-family: var(--display); font-weight: 700;
    font-size: 1.08rem; letter-spacing: .015em;
    color: #fff; line-height: 1.1;
}
.brand__meta {
    display: block;
    font-family: var(--mono); font-size: .64rem;
    letter-spacing: .13em; text-transform: uppercase;
    color: var(--surf-dim);
}

.nav__list { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }

.nav__link {
    display: flex; align-items: baseline; gap: .4rem;
    padding: .5rem .62rem;
    text-decoration: none;
    color: var(--surf-dim);
    font-size: .84rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .12s, border-color .12s;
}
.nav__num { font-family: var(--mono); font-size: .62rem; opacity: .55; }
.nav__link:hover { color: #fff; }
.nav__link.is-current { color: var(--amber); border-bottom-color: var(--amber); }

.navtoggle { display: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { position: relative; background: var(--hull); color: var(--surf); overflow: hidden; }

.hero__bg { position: absolute; inset: 0; }
.hero__bg img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(.28) contrast(1.04) brightness(.86);
}
.hero__bg::after {
    content: "";
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(13,19,23,.62) 0%, rgba(13,19,23,.18) 38%, rgba(13,19,23,.9) 92%),
        linear-gradient(90deg, rgba(13,19,23,.82) 0%, rgba(13,19,23,.34) 52%, rgba(13,19,23,.05) 100%);
}

.hero__inner {
    position: relative;
    width: min(100% - 2.5rem, var(--wrap));
    margin-inline: auto;
    padding: clamp(4rem, 12vw, 8.5rem) 0 clamp(2.4rem, 5vw, 3.6rem);
}

.hero__eyebrow {
    font-family: var(--mono);
    font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
    color: var(--amber);
    margin: 0 0 1.1rem;
}

.hero h1 { color: #fff; max-width: 15ch; margin-bottom: 1.1rem; }
.hero h1 em {
    font-style: normal;
    color: var(--amber);
    display: block;
}

.hero__lede { max-width: 54ch; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--surf); margin-bottom: 1.9rem; }
.hero__lede strong { color: #fff; font-weight: 600; }

.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 2.6rem; }

.hero__specs {
    display: flex; flex-wrap: wrap; gap: 0;
    border-top: 1px solid var(--hull-line);
    padding-top: 1.2rem;
}
.spec { padding-right: 2.4rem; margin-right: 2.4rem; border-right: 1px solid var(--hull-line); }
.spec:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.spec__k {
    display: block;
    font-family: var(--mono); font-size: .62rem;
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--surf-dim); margin-bottom: .2rem;
}
.spec__v { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1.1; }
.spec__v small { font-family: var(--body); font-size: .72rem; font-weight: 400; color: var(--surf-dim); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--display); font-weight: 600;
    font-size: 1.02rem; letter-spacing: .02em;
    padding: .62rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--r);
    text-decoration: none;
    cursor: pointer;
    transition: background .13s, color .13s, border-color .13s, transform .13s;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--amber); color: var(--hull); border-color: var(--amber); }
.btn--primary:hover { background: #F2B759; border-color: #F2B759; }

.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.07); }

.btn--dark { background: var(--hull); color: #fff; border-color: var(--hull); }
.btn--dark:hover { background: var(--hull-3); border-color: var(--hull-3); }

.btn--line { background: transparent; color: var(--ink); border-color: rgba(13,19,23,.3); }
.btn--line:hover { border-color: var(--ink); background: rgba(13,19,23,.05); }

.btn__sub { font-family: var(--mono); font-size: .66rem; opacity: .72; font-weight: 400; letter-spacing: .06em; }

/* --------------------------------------------------------------------------
   Signature element — the Win64 folder manifest
   -------------------------------------------------------------------------- */

.manifest {
    background: var(--hull);
    color: var(--surf);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--shadow-deep);
}

.manifest__head { padding: 1rem 1.2rem .9rem; border-bottom: 1px solid var(--hull-line); background: var(--hull-2); }

.manifest__path {
    font-family: var(--mono); font-size: .74rem;
    color: var(--surf-dim); word-break: break-all; line-height: 1.5;
}
.manifest__path strong { color: var(--amber); font-weight: 600; }
.manifest__drive { color: var(--sand); }
.manifest__note { margin: .55rem 0 0; font-size: .84rem; color: var(--surf-dim); }

.manifest__filters { display: flex; flex-wrap: wrap; gap: .35rem; padding: .8rem 1.2rem; border-bottom: 1px solid var(--hull-line); }

.chip {
    font-family: var(--mono); font-size: .68rem;
    letter-spacing: .07em; text-transform: uppercase;
    background: transparent; color: var(--surf-dim);
    border: 1px solid var(--hull-line);
    border-radius: 2px;
    padding: .3rem .55rem;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: .35rem;
    transition: color .12s, border-color .12s, background .12s;
}
.chip:hover { color: #fff; border-color: var(--surf-dim); }
.chip__n { opacity: .55; font-size: .9em; }
.chip.is-on { background: var(--surf); color: var(--hull); border-color: var(--surf); }
.chip--stock.is-on   { background: var(--sky);   color: #fff; border-color: var(--sky); }
.chip--ue4ss.is-on   { background: var(--sand);  color: var(--hull); border-color: var(--sand); }
.chip--mod.is-on     { background: var(--amber); color: var(--hull); border-color: var(--amber); }
.chip--runtime.is-on { background: var(--verdi); color: #fff; border-color: var(--verdi); }

.manifest__list { list-style: none; margin: 0; padding: 0; }

.mf {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 88px 78px;
    grid-template-areas: "glyph name size tag" ". note note note";
    align-items: center;
    gap: 0 .7rem;
    padding: .58rem 1.2rem;
    border-bottom: 1px solid rgba(46,62,73,.5);
    border-left: 3px solid transparent;
    transition: background .12s;
}
.mf:last-child { border-bottom: 0; }
.mf:hover { background: var(--hull-2); }
.mf.is-hidden { display: none; }

.mf--stock   { border-left-color: var(--sky); }
.mf--ue4ss   { border-left-color: var(--sand); }
.mf--mod     { border-left-color: var(--amber); }
.mf--runtime { border-left-color: var(--verdi); }

.mf__glyph { grid-area: glyph; width: 14px; height: 14px; border-radius: 1px; background: var(--hull-3); position: relative; }
.mf__glyph--dir { background: var(--sand); }
.mf__glyph--exe { background: var(--surf); }
.mf__glyph--dll { background: var(--hull-3); border: 1px solid #3C505C; }
.mf__glyph--ini { background: transparent; border: 1px solid var(--surf-dim); }
.mf__glyph--log { background: transparent; border: 1px dashed var(--surf-dim); }
.mf__glyph--doc { background: transparent; border-left: 3px solid var(--surf-dim); border-radius: 0; }

.mf__name {
    grid-area: name;
    font-family: var(--mono); font-size: .82rem;
    color: #fff; word-break: break-all;
}
.mf--mod .mf__name { color: var(--amber); font-weight: 500; }

.mf__size { grid-area: size; font-family: var(--mono); font-size: .7rem; color: var(--surf-dim); text-align: right; }

.mf__tag {
    grid-area: tag;
    font-family: var(--mono); font-size: .58rem;
    letter-spacing: .1em; text-transform: uppercase;
    text-align: right; color: var(--surf-dim);
}
.mf--mod .mf__tag { color: var(--amber); }

.mf__note {
    grid-area: note;
    font-size: .82rem; line-height: 1.5;
    color: var(--surf-dim);
    margin-top: .18rem;
    max-width: 74ch;
}

.manifest__legend {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .9rem 1.4rem;
    padding: 1.1rem 1.2rem;
    background: var(--hull-2);
    border-top: 1px solid var(--hull-line);
}
.legend { display: grid; grid-template-columns: 10px 1fr; gap: 0 .55rem; align-items: start; }
.legend__swatch { width: 10px; height: 10px; border-radius: 1px; margin-top: .38rem; }
.legend--stock   .legend__swatch { background: var(--sky); }
.legend--ue4ss   .legend__swatch { background: var(--sand); }
.legend--mod     .legend__swatch { background: var(--amber); }
.legend--runtime .legend__swatch { background: var(--verdi); }
.legend__label { font-family: var(--mono); font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: #fff; }
.legend__desc { grid-column: 2; font-size: .79rem; color: var(--surf-dim); line-height: 1.45; }

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */

.steps { counter-reset: none; }

.step {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 0 1.6rem;
    padding: 2.1rem 0;
    border-top: 1px solid var(--fog-3);
}
.step:first-child { border-top: 0; padding-top: .6rem; }

.step__mark {
    font-family: var(--display); font-weight: 700;
    font-size: 2.5rem; line-height: 1;
    color: var(--fog-3);
    letter-spacing: -.02em;
    position: sticky; top: 88px; align-self: start;
}

.step__title { margin-bottom: .5rem; }
.step__sub { color: var(--ink-2); margin-bottom: 1rem; }
.step > .step__main > *:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Code blocks
   -------------------------------------------------------------------------- */

.code {
    background: var(--hull);
    border-radius: var(--r);
    overflow: hidden;
    margin: 0 0 1.3rem;
    box-shadow: var(--shadow);
}

.code__bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
    padding: .42rem .8rem;
    background: var(--hull-2);
    border-bottom: 1px solid var(--hull-line);
}

.code__label {
    font-family: var(--mono); font-size: .63rem;
    letter-spacing: .15em; text-transform: uppercase;
    color: var(--sand);
}

.code__copy {
    font-family: var(--mono); font-size: .63rem;
    letter-spacing: .1em; text-transform: uppercase;
    background: transparent; color: var(--surf-dim);
    border: 1px solid var(--hull-line); border-radius: 2px;
    padding: .2rem .5rem; cursor: pointer;
    transition: color .12s, border-color .12s;
}
.code__copy:hover { color: #fff; border-color: var(--surf-dim); }
.code__copy.is-done { color: var(--verdi); border-color: var(--verdi); }

.code pre {
    margin: 0; padding: .85rem 1rem;
    overflow-x: auto;
    color: var(--surf);
    font-size: .82rem; line-height: 1.65;
    tab-size: 4;
}
.code pre code { background: none; padding: 0; font-size: inherit; color: inherit; }

/* --------------------------------------------------------------------------
   Callouts
   -------------------------------------------------------------------------- */

.call {
    display: grid; grid-template-columns: 20px 1fr; gap: .85rem;
    padding: 1rem 1.15rem;
    border-left: 3px solid;
    border-radius: 0 var(--r) var(--r) 0;
    margin: 0 0 1.35rem;
    font-size: .95rem;
}
.call__icon { margin-top: .18rem; }
.call__title { font-weight: 600; margin: 0 0 .3rem; }
.call__body > *:last-child { margin-bottom: 0; }
.call ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.call li { margin-bottom: .25rem; }

.call--note   { background: var(--sky-wash);   border-color: var(--sky);   color: #1D323C; }
.call--warn   { background: var(--amber-wash); border-color: var(--amber); color: #4A3306; }
.call--danger { background: var(--rust-wash);  border-color: var(--rust);  color: #591A0D; }
.call--good   { background: var(--verdi-wash); border-color: var(--verdi); color: #17402F; }

.call--note code, .call--warn code, .call--danger code, .call--good code {
    background: rgba(13,19,23,.09);
}

/* --------------------------------------------------------------------------
   Screenshots & lightbox trigger
   -------------------------------------------------------------------------- */

.shot { margin: 0 0 1.6rem; }

.shot__link {
    display: block; position: relative;
    border-radius: var(--r); overflow: hidden;
    background: var(--hull);
    box-shadow: var(--shadow);
    text-decoration: none;
    cursor: zoom-in;
}
.shot__link img { width: 100%; transition: transform .35s cubic-bezier(.2,.7,.3,1); }
.shot__link:hover img { transform: scale(1.012); }

.shot__zoom {
    position: absolute; right: .6rem; bottom: .6rem;
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(13,19,23,.86);
    color: var(--surf);
    font-family: var(--mono); font-size: .64rem;
    letter-spacing: .09em; text-transform: uppercase;
    padding: .32rem .55rem; border-radius: 2px;
    opacity: 0; transform: translateY(4px);
    transition: opacity .18s, transform .18s;
}
.shot__link:hover .shot__zoom,
.shot__link:focus-visible .shot__zoom { opacity: 1; transform: translateY(0); }

.shot figcaption {
    display: flex; flex-wrap: wrap; gap: .35rem 1rem;
    justify-content: space-between; align-items: baseline;
    padding-top: .6rem;
    font-size: .84rem; color: var(--ink-3);
    border-top: 1px solid var(--fog-3);
    margin-top: .55rem;
}
.shot__credit { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.band--dark .shot figcaption { color: var(--surf-dim); border-color: var(--hull-line); }
.band--dark .shot__credit { color: var(--surf-dim); }

.lightbox {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(6,10,12,.96);
    display: flex; flex-direction: column;
    animation: lbin .16s ease-out;
}
.lightbox[hidden] { display: none; }
@keyframes lbin { from { opacity: 0; } to { opacity: 1; } }

.lightbox__bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
    padding: .7rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
    flex: 0 0 auto;
}
.lightbox__meta {
    font-family: var(--mono); font-size: .68rem;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--surf-dim);
}
.lightbox__tools { display: flex; align-items: center; gap: .9rem; }
.lightbox__open {
    font-family: var(--mono); font-size: .68rem;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--amber); text-decoration: none;
    border-bottom: 1px solid rgba(232,163,61,.45);
}
.lightbox__open:hover { border-bottom-color: var(--amber); }
.lightbox__close {
    background: transparent; border: 1px solid rgba(255,255,255,.25);
    color: #fff; border-radius: 2px;
    width: 34px; height: 34px;
    display: grid; place-items: center; cursor: pointer;
}
.lightbox__close:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.lightbox__stage {
    flex: 1 1 auto; margin: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: .8rem; padding: 1.2rem 3.4rem 1.6rem;
    min-height: 0;
}
.lightbox__img {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    cursor: zoom-out;
    box-shadow: 0 30px 80px -30px rgba(0,0,0,.9);
}
.lightbox__cap { color: var(--surf-dim); font-size: .87rem; text-align: center; max-width: 70ch; }

.lightbox__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 66px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff; cursor: pointer;
    display: grid; place-items: center;
}
.lightbox__nav:hover { background: rgba(255,255,255,.14); }
.lightbox__nav--prev { left: .5rem; }
.lightbox__nav--next { right: .5rem; }
.lightbox.is-single .lightbox__nav { display: none; }

body.lb-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
    background: var(--paper);
    border: 1px solid var(--fog-3);
    border-radius: var(--r);
    padding: 1.4rem 1.5rem;
    display: flex; flex-direction: column;
}
.card__k {
    font-family: var(--mono); font-size: .63rem;
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--amber-deep); margin: 0 0 .55rem;
}
.card h3 { margin-bottom: .55rem; }
.card p { font-size: .95rem; color: var(--ink-2); }
.card__foot { margin-top: auto; padding-top: 1rem; }

.card--link { text-decoration: none; transition: border-color .14s, transform .14s, box-shadow .14s; }
.card--link:hover { border-color: var(--ink-3); transform: translateY(-2px); box-shadow: var(--shadow); }
.card--link .card__go {
    font-family: var(--display); font-weight: 600; font-size: 1rem;
    color: var(--amber-deep);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.tablewrap { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--fog-3); border-radius: var(--r); }

table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--paper); }

th, td { padding: .62rem .85rem; text-align: left; border-bottom: 1px solid var(--fog-3); vertical-align: top; }
th {
    font-family: var(--mono); font-size: .64rem;
    letter-spacing: .13em; text-transform: uppercase;
    color: var(--ink-3); background: var(--fog-2);
    white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--fog-2); }
td code { font-size: .85em; }
.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Section index (config page)
   -------------------------------------------------------------------------- */

.secgroup { margin-bottom: 2.2rem; }
.secgroup__title {
    font-family: var(--mono); font-size: .68rem;
    letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink-3);
    padding-bottom: .5rem; margin-bottom: 1rem;
    border-bottom: 1px solid var(--fog-3);
}

.seclist { display: grid; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.sec {
    display: grid; grid-template-columns: minmax(140px, 190px) 52px 1fr;
    gap: .3rem 1rem; align-items: baseline;
    padding: .7rem .9rem;
    background: var(--paper);
    border: 1px solid var(--fog-3);
    border-left: 3px solid var(--fog-3);
    border-radius: 0 var(--r) var(--r) 0;
}
.sec--core     { border-left-color: var(--sky); }
.sec--ai       { border-left-color: var(--amber); }
.sec--graphics { border-left-color: var(--sand); }
.sec--gore     { border-left-color: var(--rust); }
.sec__name { font-family: var(--mono); font-size: .86rem; font-weight: 500; }
.sec__n {
    font-family: var(--display); font-weight: 700; font-size: 1.25rem;
    text-align: right; color: var(--ink-2);
}
.sec__desc { font-size: .88rem; color: var(--ink-2); line-height: 1.5; }

/* --------------------------------------------------------------------------
   Presets
   -------------------------------------------------------------------------- */

.preset { border: 1px solid var(--fog-3); border-radius: var(--r); background: var(--paper); overflow: hidden; }
.preset__head { padding: 1rem 1.15rem .85rem; }
.preset__head h3 { font-size: 1.28rem; margin-bottom: .35rem; }
.preset__head p { font-size: .9rem; color: var(--ink-2); margin: 0; }
.preset .code { margin: 0; border-radius: 0; box-shadow: none; }

/* --------------------------------------------------------------------------
   Subsystems
   -------------------------------------------------------------------------- */

.sub {
    display: grid; grid-template-columns: 54px 1fr; gap: 0 1.2rem;
    padding: 1.5rem 0; border-top: 1px solid var(--fog-3);
}
.sub__n {
    font-family: var(--display); font-weight: 700; font-size: 1.9rem;
    line-height: 1; color: var(--fog-3);
}
.sub--ai   .sub__n { color: var(--amber); }
.sub--gfx  .sub__n { color: var(--sand); }
.sub--gore .sub__n { color: var(--rust); }
.sub h3 { margin-bottom: .45rem; }
.sub p { color: var(--ink-2); margin: 0; }

/* --------------------------------------------------------------------------
   Troubleshooting
   -------------------------------------------------------------------------- */

.faq { border: 1px solid var(--fog-3); border-radius: var(--r); background: var(--paper); margin-bottom: .55rem; overflow: hidden; }
.faq[open] { border-color: var(--ink-3); }

.faq summary {
    display: flex; align-items: center; gap: .8rem;
    padding: .85rem 1.1rem;
    cursor: pointer; list-style: none;
    font-family: var(--display); font-weight: 600; font-size: 1.16rem;
    transition: background .12s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--fog-2); }
.faq summary::after {
    content: "+";
    margin-left: auto;
    font-family: var(--mono); font-size: 1.15rem;
    color: var(--ink-3); flex: 0 0 auto;
}
.faq[open] summary::after { content: "\2212"; }

.faq__scope {
    font-family: var(--mono); font-size: .58rem;
    letter-spacing: .12em; text-transform: uppercase;
    padding: .2rem .42rem; border-radius: 2px;
    flex: 0 0 auto;
}
.faq__scope--mod    { background: var(--amber-wash); color: var(--amber-deep); }
.faq__scope--ue4ss  { background: var(--sky-wash);   color: #2C4653; }
.faq__scope--both   { background: var(--verdi-wash); color: #245240; }

.faq__body { padding: 0 1.1rem 1.1rem; font-size: .95rem; color: var(--ink-2); }
.faq__body > *:last-child { margin-bottom: 0; }

.faqfilter { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.4rem; }
.pill {
    font-family: var(--mono); font-size: .68rem;
    letter-spacing: .1em; text-transform: uppercase;
    background: transparent; color: var(--ink-3);
    border: 1px solid var(--fog-3); border-radius: 2px;
    padding: .35rem .65rem; cursor: pointer;
    transition: all .12s;
}
.pill:hover { border-color: var(--ink-3); color: var(--ink); }
.pill.is-on { background: var(--hull); color: #fff; border-color: var(--hull); }

/* --------------------------------------------------------------------------
   Downloads
   -------------------------------------------------------------------------- */

.dl {
    display: grid; grid-template-columns: 1fr auto; gap: 1rem 1.6rem;
    align-items: center;
    padding: 1.3rem 1.5rem;
    border: 1px solid var(--fog-3); border-radius: var(--r);
    background: var(--paper);
    margin-bottom: 1rem;
}
.dl--feature { border-color: var(--amber); border-width: 2px; background: #fff; }
.dl--mirror { border-color: var(--verdi); }
.dl__title { font-family: var(--display); font-weight: 700; font-size: 1.45rem; margin: 0 0 .3rem; }
.dl__meta {
    font-family: var(--mono); font-size: .7rem;
    letter-spacing: .06em; color: var(--ink-3);
    margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .3rem .9rem;
}
.dl__desc { font-size: .93rem; color: var(--ink-2); margin: 0; max-width: 60ch; }

.hash {
    font-family: var(--mono); font-size: .68rem;
    word-break: break-all; color: var(--ink-3);
    background: var(--fog-2); padding: .45rem .6rem; border-radius: 2px;
    margin-top: .7rem; line-height: 1.5;
}
.hash b { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   Pager
   -------------------------------------------------------------------------- */

.pager {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: 2.4rem 0 0;
    border-top: 1px solid var(--fog-3);
    margin-top: 3rem;
}
.pager__link {
    display: flex; flex-direction: column; gap: .15rem;
    text-decoration: none; padding: .7rem 1rem;
    border: 1px solid var(--fog-3); border-radius: var(--r);
    background: var(--paper);
    transition: border-color .14s, background .14s;
    max-width: 48%;
}
.pager__link:hover { border-color: var(--ink); background: #fff; }
.pager__link--next { text-align: right; margin-left: auto; }
.pager__dir { font-family: var(--mono); font-size: .64rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
.pager__label { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer { background: var(--hull); color: var(--surf-dim); padding: 3.2rem 0 0; margin-top: 0; }
.footer__inner {
    width: min(100% - 2.5rem, var(--wrap));
    margin-inline: auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
    padding-bottom: 2.4rem;
}
.footer__sig { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: #fff; margin: 0 0 .5rem; }
.footer__by { font-size: .92rem; color: var(--surf); margin-bottom: .8rem; }
.footer__by strong { color: var(--amber); font-weight: 600; }
.footer__legal { font-size: .82rem; line-height: 1.6; max-width: 62ch; margin: 0; }
.footer__head {
    font-family: var(--mono); font-size: .64rem;
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--sand); margin: 0 0 .7rem;
}
.footer__links { list-style: none; margin: 0; padding: 0; }
.footer__links li { margin-bottom: .35rem; }
.footer__links a { color: var(--surf-dim); text-decoration: none; font-size: .9rem; }
.footer__links a:hover { color: #fff; }

.footer__rule {
    border-top: 1px solid var(--hull-line);
    padding: 1rem 0;
}
.footer__rule > * { display: block; }
.footer__rule {
    width: 100%;
}
.footer__rule span:first-child { font-family: var(--display); font-weight: 600; color: var(--surf); }
.footer__rule span:last-child { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; color: var(--surf-dim); }

.footer__rule {
    display: flex; flex-wrap: wrap; gap: .4rem 1.5rem;
    justify-content: space-between; align-items: center;
    width: min(100% - 2.5rem, var(--wrap));
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Misc utilities
   -------------------------------------------------------------------------- */

.stack > * + * { margin-top: 1.15rem; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.center { text-align: center; }

.checklist { list-style: none; margin: 0 0 1.3rem; padding: 0; }
.checklist li {
    position: relative; padding-left: 1.7rem; margin-bottom: .55rem;
    font-size: .96rem;
}
.checklist li::before {
    content: "";
    position: absolute; left: 0; top: .48em;
    width: 9px; height: 9px;
    border: 2px solid var(--amber-deep);
    border-radius: 1px;
}
.checklist--done li::before { background: var(--verdi); border-color: var(--verdi); }

.deflist { margin: 0 0 1.4rem; }
.deflist dt {
    font-family: var(--mono); font-size: .84rem; font-weight: 600;
    margin-top: 1rem; color: var(--ink);
}
.deflist dt:first-child { margin-top: 0; }
.deflist dd { margin: .25rem 0 0; font-size: .94rem; color: var(--ink-2); }

.logline {
    font-family: var(--mono); font-size: .8rem;
    background: var(--hull); color: var(--verdi);
    padding: .55rem .8rem; border-radius: var(--r);
    display: inline-block; margin-bottom: 1.2rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 940px) {
    .navtoggle {
        display: inline-flex; align-items: center; gap: .5rem;
        background: transparent; border: 1px solid var(--hull-line);
        color: var(--surf); border-radius: 2px;
        padding: .4rem .65rem; cursor: pointer;
        font-family: var(--mono); font-size: .68rem;
        letter-spacing: .12em; text-transform: uppercase;
    }
    .navtoggle__bars { display: grid; gap: 3px; }
    .navtoggle__bars i { display: block; width: 15px; height: 2px; background: currentColor; }

    .nav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--hull);
        border-bottom: 1px solid var(--hull-line);
        padding: .5rem 0 .9rem;
    }
    .nav.is-open { display: block; }
    .masthead__inner { position: relative; flex-wrap: wrap; }
    .nav__list { flex-direction: column; width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
    .nav__link { padding: .65rem .2rem; border-bottom: 1px solid rgba(46,62,73,.5); }
    .nav__link.is-current { border-bottom-color: var(--amber); }

    .footer__inner { grid-template-columns: 1fr 1fr; }
    .footer__col--wide { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    body { font-size: 16px; }
    .step { grid-template-columns: 1fr; gap: .5rem; }
    .step__mark { position: static; font-size: 1.6rem; color: var(--amber-deep); }
    .sub { grid-template-columns: 1fr; gap: .3rem; }
    .sec { grid-template-columns: 1fr 44px; }
    .sec__desc { grid-column: 1 / -1; }
    .mf {
        grid-template-columns: 18px minmax(0,1fr) auto;
        grid-template-areas: "glyph name tag" ". size size" ". note note";
    }
    .mf__size { text-align: left; }
    .dl { grid-template-columns: 1fr; }
    .hero__specs .spec { border-right: 0; padding-right: 0; margin-right: 1.8rem; }
    .pager { flex-direction: column; }
    .pager__link { max-width: none; }
    .pager__link--next { text-align: left; margin-left: 0; }
    .lightbox__stage { padding: 1rem .8rem 3.6rem; }
    .lightbox__nav { top: auto; bottom: .5rem; transform: none; height: 44px; }
    .footer__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .masthead, .navtoggle, .pager, .lightbox, .code__copy, .manifest__filters, .faqfilter { display: none !important; }
    body { background: #fff; font-size: 11pt; }
    .band--dark, .manifest, .code { background: #fff !important; color: #000 !important; }
    .manifest, .code, .mf, .call { border: 1px solid #999; }
    .mf__name, .manifest__path strong, .code pre { color: #000 !important; }
    .faq[open] .faq__body, .faq__body { display: block !important; }
    .faq { page-break-inside: avoid; }
}
