/* The site's camouflage theme (docs/.vitepress/theme/camo.css), dark variant. */
:root {
  color-scheme: dark;
  --camo-olive: #727431;
  --camo-olive-dark: #4f5122;
  --camo-green: #80a131;
  --camo-brown: #996c48;
  --camo-tan: #b58557;
  --bg: #1b1d12;
  --bg-alt: #15170e;
  --bg-soft: #262a1b;
  --divider: #3a3d26;
  --text: #ece6d2;
  --text-2: #bfb699;
  --brand: #a9c24e;
  --warn: #d0a070;
  --bad: #e07a5f;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-soft); padding: .1em .35em; border-radius: 4px; }
h1 { font-size: 2rem; line-height: 1.2; margin: 1.5rem 0 .5rem; background: linear-gradient(120deg, var(--camo-green) 10%, var(--camo-tan) 60%, var(--camo-brown));
  -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.small { font-size: .85rem; color: var(--text-2); }

.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 24px; height: 60px; background: var(--bg); border-bottom: 1px solid var(--divider); }
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 4px;
  background: repeating-linear-gradient(100deg, var(--camo-olive) 0 38px, var(--camo-green) 38px 66px,
    var(--camo-brown) 66px 104px, var(--camo-tan) 104px 126px, var(--camo-olive-dark) 126px 160px); }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 600; font-size: 1.05rem; }
.brand img { image-rendering: pixelated; }
.bar nav { display: flex; gap: 1.2rem; font-size: .9rem; }
.bar nav a { color: var(--text-2); }
.bar nav a[aria-current] { color: var(--brand); }

main { max-width: 1100px; margin: 0 auto; padding: 8px 24px 32px; }
.lead { color: var(--text-2); max-width: 60rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 1.2rem 0; }
.card { background: var(--bg-soft); border: 1px solid var(--divider); border-radius: 10px; padding: 18px 20px; }
.card ul { padding-left: 1.2rem; margin: 0; }
.card li { margin: .35rem 0; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .8rem 0; }

button { font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; border-radius: 20px; padding: .45rem 1.1rem;
  border: 1px solid transparent; background: #33361f; color: var(--text); }
button:hover { background: #414528; }
button.primary { background: var(--camo-olive); color: #f6f2e7; }
button.primary:hover { background: #85883b; }
button.link { background: none; padding: .45rem .2rem; color: var(--brand); font-weight: 500; }
button.link:hover { text-decoration: underline; background: none; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.checks { list-style: none; padding: 0 !important; margin: .8rem 0 0 !important; }
.checks li { padding-left: 1.4rem; position: relative; }
.checks li::before { position: absolute; left: 0; font-weight: 700; }
.checks li.ok::before { content: "+"; color: var(--camo-green); }
.checks li.bad { color: var(--bad); }
.checks li.bad::before { content: "x"; }
progress { width: 100%; height: 10px; accent-color: var(--camo-green); margin-top: .8rem; }

.message { max-width: 60rem; padding: .6rem 1rem; border-radius: 8px; border-left: 4px solid var(--camo-green); background: var(--bg-soft); }
.message.warn { border-color: var(--warn); }
.message.error { border-color: var(--bad); }

/* The game: 4:3, letterboxed in the window, crisp pixels at any scale. */
#game { margin: 1rem 0; }
.stage { position: relative; background: #000; border-radius: 6px; overflow: hidden; margin: 0 auto;
  width: min(100%, calc((100vh - 150px) * 4 / 3)); aspect-ratio: 4 / 3; }
.stage canvas { display: block; width: 100%; height: 100%; object-fit: contain;
  image-rendering: pixelated; image-rendering: crisp-edges; }
.stage:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.stage:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; margin-top: .7rem; }
.toolbar button { padding: .35rem .9rem; font-size: .85rem; }

#controls { margin-top: 2rem; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .45rem .7rem; border-bottom: 1px solid var(--divider); }
th { color: var(--text-2); font-weight: 600; }
tbody tr:nth-child(odd) { background: rgba(38, 42, 27, .5); }

.error { color: var(--bad); white-space: pre-wrap; font-size: .85rem; }
.foot .powered { margin: 0 0 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.foot .powered img { display: block; }
.foot { max-width: 1100px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--divider); color: var(--text-2); font-size: .8rem; text-align: center; }

[hidden] { display: none !important; }
@media (max-width: 640px) { .bar nav a:not([aria-current]):not(:last-child) { display: none; } }
#view-controls { display: inline-flex; gap: .4rem; align-items: center; }
#view-controls select { padding: .3rem .4rem; font-size: .85rem; }
