/* ============================================================
   ORE FACTORY SQUAD WIKI — "Job Site Manual" theme
   Matches the main site: asphalt dark · hard-hat yellow · paper
   ============================================================ */

:root {
    --asphalt: #16140f;
    --asphalt-2: #1e1b14;
    --steel: #2b2820;
    --yellow: #f2a900;
    --yellow-bright: #ffbf1f;
    --red: #c8392b;
    --paper: #ece4d2;
    --paper-dark: #ddd2b8;
    --ink: #24201a;
    --text: #e9e2d2;
    --text-dim: #a89d85;
    --line: rgba(242, 169, 0, 0.18);
    --font-display: "Big Shoulders Display", sans-serif;
    --font-cond: "Barlow Condensed", sans-serif;
    --font-body: "Barlow", sans-serif;
    --hazard: repeating-linear-gradient(-45deg, var(--yellow) 0 16px, #191611 16px 32px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--asphalt);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.65;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--yellow); text-decoration: none; }
a:hover { color: var(--yellow-bright); }
::selection { background: var(--yellow); color: var(--ink); }

.hazard-strip { height: 10px; background: var(--hazard); }

/* ---------- Top bar ---------- */
.wtop {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: clamp(12px, 2.5vw, 28px);
    padding: 10px clamp(14px, 3vw, 36px);
    background: linear-gradient(rgba(16, 14, 10, 0.97), rgba(16, 14, 10, 0.92));
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.wtop-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.wtop-logo img { height: 46px; width: auto; }
.wtop-wiki {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 0.08em;
    color: var(--ink);
    background: var(--yellow);
    padding: 1px 9px;
    transform: rotate(-2deg);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.wtop-search { position: relative; flex: 1; max-width: 560px; }
.wtop-search input {
    width: 100%;
    background: var(--asphalt-2);
    border: 1px solid var(--steel);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.15s;
}
.wtop-search input:focus { border-color: var(--yellow); }
.wtop-search input::placeholder { color: var(--text-dim); }

.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--asphalt-2);
    border: 1px solid var(--yellow);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
    max-height: 420px;
    overflow-y: auto;
}
.search-results a {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    color: var(--text);
    border-bottom: 1px solid var(--steel);
}
.search-results a:hover { background: var(--steel); }
.search-results a span { font-size: 22px; }
.search-results a strong { display: block; font-family: var(--font-cond); font-size: 17px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--yellow); }
.search-results a small { color: var(--text-dim); font-size: 13px; line-height: 1.4; display: block; }
.sr-none { padding: 14px; color: var(--text-dim); font-size: 14px; }

.wtop-links { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.wtop-link, .wtop-random {
    font-family: var(--font-cond);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}
.wtop-link:hover, .wtop-random:hover { color: var(--yellow); }
.wtop-steam {
    font-family: var(--font-cond);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    background: var(--yellow);
    color: #17140c;
    padding: 8px 16px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.wtop-steam:hover { background: var(--yellow-bright); color: #17140c; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5); }

.wtop-burger {
    display: none;
    background: none;
    border: 1px solid var(--steel);
    color: var(--text);
    font-size: 20px;
    padding: 4px 12px;
    cursor: pointer;
}

/* ---------- Layout ---------- */
.wlayout {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    gap: 0;
    max-width: 1320px;
    margin: 0 auto;
    min-height: calc(100vh - 140px);
}

/* ---------- Sidebar ---------- */
.wside {
    border-right: 1px solid var(--steel);
    padding: 28px 0 40px;
    display: flex;
    flex-direction: column;
}
.wside-inner { position: sticky; top: 92px; padding: 0 8px 24px 0; }
.wside-cat {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.14em;
    color: var(--yellow);
    padding: 18px 18px 6px;
    border-bottom: 1px dashed var(--steel);
    margin-bottom: 4px;
}
.wside ul { list-style: none; margin-bottom: 6px; }
.wside li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 18px;
    color: var(--text-dim);
    font-family: var(--font-cond);
    font-weight: 500;
    font-size: 17px;
    letter-spacing: 0.03em;
    border-left: 3px solid transparent;
    transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.wside li a:hover { color: var(--text); background: rgba(242, 169, 0, 0.06); }
.wside li a.active {
    color: var(--yellow);
    background: rgba(242, 169, 0, 0.1);
    border-left-color: var(--yellow);
}
.wside-icon { width: 22px; text-align: center; flex-shrink: 0; }
.wside-foot { margin-top: auto; padding: 18px; font-size: 13.5px; }
.wside-foot a { color: var(--text-dim); }
.wside-foot a:hover { color: var(--yellow); }

/* ---------- Article ---------- */
.warticle { padding: 32px clamp(20px, 4vw, 56px) 60px; min-width: 0; }

.wcrumbs {
    font-family: var(--font-cond);
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 18px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.wcrumbs span { color: var(--steel); }
.wcrumbs em { font-style: normal; }
.wcrumbs strong { color: var(--text); font-weight: 600; }

.wtag {
    display: inline-block;
    font-family: var(--font-cond);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--yellow);
    padding: 2px 10px;
    margin-bottom: 10px;
    transform: rotate(-1deg);
}

.wtitle {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(34px, 5vw, 52px);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.05;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--yellow);
}

.wcontent h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(23px, 3vw, 30px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--yellow);
    margin: 36px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--steel);
    scroll-margin-top: 100px;
}
.wcontent h3 {
    font-family: var(--font-cond);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 24px 0 8px;
}
.wcontent p { margin: 0 0 14px; }
.wcontent ul, .wcontent ol { margin: 0 0 16px 24px; }
.wcontent li { margin-bottom: 7px; }
.wcontent strong { color: #fff; }
.wcontent em { color: var(--paper-dark); }

/* Item icons */
.wicon {
    display: inline-block;
    width: 26px;
    height: 26px;
    object-fit: contain;
    vertical-align: -7px;
    margin-right: 4px;
    background: rgba(242, 169, 0, 0.08);
    border-radius: 4px;
}

/* Tables */
.wtable {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 20px;
    font-size: 15.5px;
    display: block;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--steel);
    padding: 4px 14px;
}
.wtable tr { border-bottom: 1px solid rgba(43, 40, 32, 0.8); }
.wtable tr:last-child { border-bottom: none; }
.wtable tr:hover td { background: rgba(242, 169, 0, 0.05); }
.wtable th {
    font-family: var(--font-cond);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--yellow);
    text-align: left;
    padding: 10px 16px 10px 0;
    vertical-align: top;
    white-space: nowrap;
}
.wtable td { padding: 9px 16px 9px 0; vertical-align: middle; }
.wtable td:first-child { white-space: nowrap; }

/* Infobox (fandom-style card) */
.winfobox {
    float: right;
    width: min(280px, 42%);
    margin: 4px 0 14px 20px;
    background: var(--asphalt-2);
    border: 1px solid var(--steel);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
}
.wib-head {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.1em;
    background: var(--yellow);
    color: var(--ink);
    padding: 7px 12px;
}
.winfobox table { width: 100%; border-collapse: collapse; font-size: 14px; }
.winfobox th {
    font-family: var(--font-cond);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-align: left;
    padding: 7px 10px;
    border-bottom: 1px solid var(--steel);
    white-space: nowrap;
    vertical-align: top;
}
.winfobox td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--steel); vertical-align: top; }
.winfobox tr:last-child th, .winfobox tr:last-child td { border-bottom: none; }

/* Figures */
.wfig { margin: 4px 0 22px; }
.wfig img { border: 1px solid var(--steel); box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4); }
.wfig figcaption {
    font-family: var(--font-cond);
    font-size: 14.5px;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    margin-top: 8px;
}

/* TOC */
.wtoc {
    background: var(--asphalt-2);
    border-left: 3px solid var(--yellow);
    padding: 14px 20px;
    margin: 0 0 24px;
    max-width: 460px;
}
.wtoc strong {
    font-family: var(--font-cond);
    font-size: 14px;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    display: block;
    margin-bottom: 6px;
}
.wtoc ol { margin: 0 0 0 20px; }
.wtoc li { margin: 3px 0; }
.wtoc a { color: var(--text); }
.wtoc a:hover { color: var(--yellow); }

/* Flow diagram */
.wflow {
    font-family: var(--font-cond);
    font-weight: 600;
    font-size: clamp(15px, 2.4vw, 19px);
    letter-spacing: 0.05em;
    background: var(--asphalt-2);
    border: 1px dashed var(--yellow);
    padding: 14px 18px;
    margin: 8px 0 18px;
    overflow-x: auto;
    white-space: nowrap;
}
.wflow strong { color: var(--yellow); }

/* Prev / next */
.wprevnext {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 44px;
    clear: both;
}
.wpn {
    flex: 1;
    max-width: 46%;
    border: 1px solid var(--steel);
    padding: 12px 18px;
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}
.wpn:hover { border-color: var(--yellow); background: rgba(242, 169, 0, 0.06); color: var(--text); }
.wpn small {
    display: block;
    font-family: var(--font-cond);
    font-size: 12.5px;
    letter-spacing: 0.14em;
    color: var(--text-dim);
}
.wpn span { font-family: var(--font-cond); font-weight: 600; font-size: 18px; letter-spacing: 0.03em; text-transform: uppercase; }
.wpn-next { margin-left: auto; text-align: right; }

/* Steam widget */
.wsteam {
    clear: both;
    position: relative;
    margin-top: 40px;
    border: 1px solid var(--steel);
    background: var(--asphalt-2);
    padding: 26px 14px 14px;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4);
}
.wsteam-tag {
    position: absolute;
    top: -12px;
    left: 14px;
    font-family: var(--font-cond);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.14em;
    background: var(--yellow);
    color: var(--ink);
    padding: 2px 12px;
    transform: rotate(-1.5deg);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}
.wsteam iframe { display: block; border: 0; }
.wsteam-top { margin: 14px 0 30px; }

/* Stub notice */
.wstub {
    clear: both;
    margin-top: 36px;
    border: 1px dashed var(--red);
    padding: 14px 18px;
    background: rgba(200, 57, 43, 0.06);
    font-size: 14px;
    color: var(--text-dim);
}
.wstub strong {
    font-family: var(--font-cond);
    letter-spacing: 0.12em;
    color: var(--red);
    display: block;
    margin-bottom: 4px;
}
.wstub p { margin: 0; }

/* ---------- Portal (home) ---------- */
.portal-hero {
    position: relative;
    margin: 0 0 26px;
    border: 1px solid var(--steel);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.45);
    overflow: hidden;
}
.portal-bg { width: 100%; height: 240px; object-fit: cover; filter: brightness(0.5) saturate(1.05); }
.portal-hero-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 clamp(20px, 4vw, 44px);
}
.portal-hero-text h1 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(30px, 5.5vw, 56px);
    letter-spacing: 0.03em;
    line-height: 1;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6);
}
.portal-hero-text p {
    max-width: 560px;
    margin-top: 10px;
    color: var(--paper-dark);
    font-size: clamp(14px, 1.8vw, 17px);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin: 14px 0 10px;
}
.portal-card {
    display: block;
    background: var(--asphalt-2);
    border: 1px solid var(--steel);
    padding: 18px;
    color: var(--text);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.portal-card:hover {
    border-color: var(--yellow);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.45);
    color: var(--text);
}
.pc-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.portal-card h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 6px;
}
.portal-card p { font-size: 14px; color: var(--text-dim); margin: 0; }

/* ---------- Footer ---------- */
.wfoot {
    border-top: 1px solid var(--steel);
    padding: 22px clamp(16px, 4vw, 48px);
    text-align: center;
    font-size: 13.5px;
    color: var(--text-dim);
}
.wfoot a { color: var(--text-dim); }
.wfoot a:hover { color: var(--yellow); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
    .wtop-link { display: none; }
}
@media (max-width: 860px) {
    .wtop { flex-wrap: wrap; }
    .wtop-search { order: 3; flex-basis: 100%; max-width: none; }
    .wtop-links { margin-left: auto; }
    .wtop-random { display: none; }
    .wtop-burger { display: block; }

    .wlayout { grid-template-columns: 1fr; }
    .wside {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: min(300px, 84vw);
        background: var(--asphalt-2);
        border-right: 1px solid var(--yellow);
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        overflow-y: auto;
        padding-top: 16px;
    }
    body.nav-open .wside { transform: translateX(0); box-shadow: 12px 0 40px rgba(0, 0, 0, 0.6); }
    .wside-inner { position: static; }

    .winfobox { float: none; width: 100%; margin: 0 0 16px; }
    .wprevnext { flex-direction: column; }
    .wpn { max-width: none; }
    .wpn-next { text-align: left; }
}
