/* VCE Plus Ultra player site. Same frame as the Beyond Our Reach site (Steam navy, white bracket lines,
   squared headline type), with a chemfuel-amber accent. */

@font-face {
  font-family: "Audiowide";
  src: url("../fonts/audiowide-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --navy: #1b2838;
  --navy-deep: #141f2c;
  --navy-row: #1f2e40;
  --glow: #4a3418;
  --text: #dfe6ee;
  --muted: #9fb0c0;
  --link: #f2c27a;
  --accent: #f0a04b;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.55);
  --head: "Audiowide", "Segoe UI", system-ui, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--glow) 0, var(--navy) 520px) no-repeat, var(--navy);
  color: var(--text);
  font: 15px/1.6 var(--body);
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 400; color: #fff; line-height: 1.25; }
code { background: rgba(0, 0, 0, 0.3); padding: 0.1em 0.35em; border-radius: 3px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--navy); padding: 6px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 24px;
  background: rgba(16, 26, 38, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid #fff;
}
.brand { font-family: var(--head); font-size: 17px; color: #fff; white-space: nowrap; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.topnav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.topnav a { font-family: var(--head); font-size: 13px; color: var(--text); padding: 4px 0; border-bottom: 2px solid transparent; }
.topnav a:hover { text-decoration: none; color: #fff; }
.topnav a.on { color: #fff; border-bottom-color: var(--accent); }
.menu-toggle { display: none; margin-left: auto; font-family: var(--head); font-size: 12px; background: none; color: #fff; border: 2px solid #fff; padding: 4px 10px; cursor: pointer; }

/* ---------- page layout ---------- */
.layout { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; padding: 28px 24px 48px; }
.sidebar { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; font-size: 14px; }
.side-head { font-family: var(--head); color: #fff; font-size: 12px; margin: 0 0 8px; padding-top: 10px; border-top: 3px solid #fff; width: fit-content; min-width: 80px; }
.sidebar ol { list-style: none; margin: 0 0 22px; padding: 0; }
.sidebar li { margin: 2px 0; }
.sidebar li a { color: var(--muted); }
.sidebar li.on a, .sidebar li a:hover { color: #fff; }
.side-pages li.on a { border-left: 3px solid var(--accent); padding-left: 8px; }

.content { min-width: 0; }
.content > p, .content > ul:not(.gallery), .content > ol, .content > blockquote { max-width: 78ch; }
.page-head h1 { font-size: 30px; margin: 0 0 8px; }
.content h2 { font-size: 21px; margin: 40px 0 12px; }
.content h2::before { content: ""; display: block; width: 130px; height: 4px; background: #fff; margin-bottom: 12px; }
.content h3 { font-size: 16px; margin: 26px 0 8px; }
.content blockquote { margin: 16px 0; padding: 4px 18px; border-left: 4px solid var(--line-strong); color: var(--muted); font-style: italic; }
/* Text quoted from the game itself */
.content blockquote.game-text { max-width: 78ch; padding: 10px 18px; border-left-color: var(--accent); background: rgba(0, 0, 0, 0.2); color: var(--text); font-style: normal; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; margin: 6px 0 18px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.12); }
table.stats, .content > table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.stats thead th, .content > table thead th { position: sticky; top: 0; background: var(--navy-deep); color: #fff; font-family: var(--head); font-weight: 400; font-size: 11.5px; text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--line-strong); white-space: nowrap; }
table.stats thead th[title] { cursor: help; text-decoration: underline dotted rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
table.stats td, table.stats tbody th, .content > table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
table.stats tbody tr:nth-child(even) > *, .content > table tbody tr:nth-child(even) > * { background: rgba(255, 255, 255, 0.025); }
table.stats tbody tr:hover > * { background: rgba(255, 255, 255, 0.06); }
table.stats td.wrap { white-space: normal; min-width: 150px; max-width: 320px; font-size: 13px; }
table.stats th.name { position: sticky; left: 0; z-index: 1; background: var(--navy-row); font-weight: 400; min-width: 220px; max-width: 330px; white-space: normal; }
table.stats thead th:first-child { left: 0; z-index: 3; }
.name-wrap { display: flex; gap: 10px; align-items: center; }
.name-wrap img, .name-wrap .noicon { flex: 0 0 36px; width: 36px; height: 36px; object-fit: contain; }
.noicon { display: inline-block; border: 1px dashed var(--line); border-radius: 4px; }
.label { color: #fff; font-weight: 600; display: block; }
.amt b { color: #fff; font-weight: 600; }
.badge { display: inline-block; margin: 3px 4px 0 0; padding: 0 7px; font-size: 11px; line-height: 18px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 9px; color: var(--text); white-space: nowrap; font-family: var(--body); }
.note { display: block; color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
table.research .rdesc { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
table.research th.name { min-width: 300px; max-width: 520px; }

/* ---------- refinery cards ---------- */
.building { margin: 18px 0 30px; padding: 14px 16px 4px; border: 1px solid var(--line); border-top: 3px solid var(--accent); background: rgba(0, 0, 0, 0.16); }
.building-head { display: flex; gap: 14px; align-items: center; }
.building-head img, .building-head .noicon { flex: 0 0 72px; width: 72px; height: 72px; object-fit: contain; }
.building-head h3 { margin: 0 0 2px; font-size: 17px; }
.bdesc { color: var(--muted); font-size: 13.5px; max-width: 90ch; margin: 10px 0; }
dl.facts { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 8px 0 12px; font-size: 13.5px; }
dl.facts div { display: flex; gap: 8px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; color: #fff; }

.net-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.swatch { display: inline-block; width: 16px; height: 16px; border: 1px solid var(--line-strong); }

/* ---------- galleries ---------- */
ul.gallery { list-style: none; padding: 0; margin: 8px 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.gcard { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-top: 3px solid rgba(255, 255, 255, 0.75); background: rgba(0, 0, 0, 0.18); }
.gcard img, .gcard .noicon { flex: 0 0 56px; width: 56px; height: 56px; object-fit: contain; }
.gcard h4 { margin: 0 0 2px; font-size: 13.5px; }
.gcard p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

figure { margin: 18px 0; }
figure.shot img { display: block; max-width: 100%; border: 1px solid var(--line); }
figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 1000px; }

ul.deps { padding-left: 20px; }

/* pager */
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); }
.pager a { display: block; padding: 10px 16px; border: 1px solid var(--line); border-top: 3px solid #fff; min-width: 200px; color: #fff; font-family: var(--head); font-size: 13px; }
.pager a span { display: block; font-family: var(--body); font-size: 12px; color: var(--muted); }
.pager a:hover { text-decoration: none; background: rgba(255, 255, 255, 0.05); }
.pager .next { text-align: right; margin-left: auto; }

/* ---------- home ---------- */
.hero { position: relative; display: flex; align-items: flex-end; overflow: hidden; border-bottom: 2px solid #fff; }
/* The preview image twice: blurred to fill the band, then sharp in the middle (its text is the title). */
.hero-art { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(18px) brightness(0.45); }
.hero-inner { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; padding: 32px 24px 30px; text-align: center; }
.hero-logo { display: block; width: min(720px, 100%); margin: 0 auto; border: 2px solid #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tagline { font-size: 18px; color: #fff; max-width: 60ch; margin: 14px auto 6px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }
.btn { display: inline-block; margin: 8px 5px 0; padding: 8px 18px; font-family: var(--head); font-size: 13px; color: #fff; border: 2px solid #fff; background: rgba(16, 26, 38, 0.6); }
.btn:hover { text-decoration: none; background: rgba(255, 255, 255, 0.15); }
.btn.primary { background: #fff; color: var(--navy); }
.home { max-width: 1240px; margin: 0 auto; padding: 32px 24px 56px; }
.home-intro { max-width: 80ch; }
.home-intro h2 { font-size: 20px; margin: 30px 0 10px; }
.home-intro h2::before { content: ""; display: block; width: 110px; height: 4px; background: #fff; margin-bottom: 10px; }
.cards-head { font-size: 20px; margin: 36px 0 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { display: block; border: 1px solid var(--line); border-top: 3px solid #fff; background: rgba(0, 0, 0, 0.2); color: var(--text); padding-bottom: 12px; transition: background 0.15s; }
.card:hover { text-decoration: none; background: rgba(255, 255, 255, 0.05); }
.card .thumb { height: 108px; background-color: rgba(0, 0, 0, 0.25); border-bottom: 1px solid var(--line); }
.card .thumb-icons { display: flex; align-items: center; justify-content: center; padding: 8px; }
.card .thumb-icons img { height: 92px; width: auto; object-fit: contain; }
.card-group { display: block; margin: 10px 12px 0; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.card h3 { margin: 2px 12px 4px; font-size: 15px; }
.card p { margin: 0 12px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.footer { border-top: 1px solid var(--line); padding: 22px 24px 40px; text-align: center; font-size: 13px; }
.footer p { margin: 4px 0; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px 16px 40px; }
  .sidebar { position: static; max-height: none; }
  .sidebar ol { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; }
  .sidebar .side-toc, .sidebar .side-head:nth-of-type(2) { display: none; }
  .js .menu-toggle { display: block; }
  .topbar { flex-wrap: wrap; padding: 8px 16px; }
  .topnav { width: 100%; padding: 6px 0 4px; }
  .js .topnav { display: none; flex-direction: column; gap: 2px; }
  .js .topnav.open { display: flex; }
  .page-head h1 { font-size: 24px; }
  table.stats th.name { min-width: 170px; }
  .building { padding: 12px 12px 2px; }
  .home, .hero-inner { padding-left: 16px; padding-right: 16px; }
  .pager a { min-width: 0; }
}

/* ---------- other Bamba mods (footer) ---------- */
.other-mods { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.other-mods-title { margin: 0 0 6px; font-weight: 600; }
.other-mods ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer .other-mods ul { justify-content: center; }
.other-mods li { margin: 0; }
.other-mods .ws { color: var(--muted); font-size: 0.9em; margin-left: 4px; }
