/* The player's own six colours (docs/style-guide.md), dark by default like its screen. */
:root {
  --bg: #000;
  --surface: #101010;
  --ink: #f0f0f0;
  --muted: #8a8a8a;
  --rule: #2a2a2a;
  --accent: #2098ff;
  --on-accent: #000;
  --warn: #ffa020;
  --err: #ff4838;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafafa;
    --surface: #fff;
    --ink: #111;
    --muted: #666;
    --rule: #ddd;
    --accent: #0a6fd0;
    --on-accent: #fff;
    --warn: #a35d00;
    --err: #c62a1b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
a { color: var(--accent); text-underline-offset: 2px; }
code, kbd { font-family: var(--mono); font-size: .88em; }
code { overflow-wrap: anywhere; }
kbd {
  border: 1px solid var(--muted);
  border-radius: 4px;
  padding: 0 .35em;
  white-space: nowrap;
}

.bar, main, footer { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.mark {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dot { width: 10px; height: 10px; background: var(--accent); border-radius: 2px; }
nav { display: flex; gap: 20px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current] { color: var(--ink); }
.bar .right { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.bar a.coffee {
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 600;
  font-size: .9rem;
  padding: 4px 12px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.bar a.coffee:hover { filter: brightness(1.12); }

h1 { font-size: 2.1rem; line-height: 1.2; margin: 48px 0 12px; letter-spacing: -.01em; }
h2 {
  font-size: 1.3rem;
  margin: 48px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
h3 { font-size: 1.05rem; margin: 28px 0 8px; }
.lede { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.lede strong { color: var(--ink); font-weight: 600; }

ul, ol { padding-left: 1.3em; }
li { margin: .3em 0; }
li::marker { color: var(--muted); }

/* Screens: the 320x170 renders, doubled with hard pixels, framed like the panel. */
.screens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.screens figure { margin: 0; }
.screens img, .support img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 170;
  image-rendering: pixelated;
  background: #000;
  border: 6px solid #1c1c1c;
  border-radius: 8px;
}
.screens figcaption, .support figcaption { color: var(--muted); font-size: .85rem; margin-top: 6px; }

/* Downloads */
.download {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 24px 0;
}
.download p { margin: .4em 0; }
.download .meta { color: var(--muted); font-size: .9rem; }
.download .meta code { color: var(--ink); }
p.danger {
  color: var(--err);
  border-left: 3px solid var(--err);
  padding-left: 12px;
  margin: 0 0 16px;
}
.danger strong { color: var(--err); }

/* Support: its own card, tinted with the accent, never muted. */
.support {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--rule));
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
  scroll-margin-top: 16px;
}
.support p { margin: .4em 0 .8em; }
.support p:last-child { margin-bottom: 0; }
.support strong { color: var(--ink); }
/* the pitch beside the Supporters screen; stacked when there's no room for both */
.support:has(figure) {
  display: grid;
  grid-template-columns: 1fr minmax(0, 280px);
  gap: 22px;
  align-items: center;
}
.support figure { margin: 0; }

a.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  margin: 4px 8px 4px 0;
}
a.button:hover { filter: brightness(1.12); }
a.button.quiet {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.warn { color: var(--warn); }
.note {
  border-left: 3px solid var(--warn);
  padding: 2px 0 2px 14px;
  margin: 20px 0;
}

table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: .95rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

footer {
  margin-top: 64px;
  padding-top: 18px;
  padding-bottom: 40px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .85rem;
}
footer p { margin: .3em 0; }

@media (max-width: 640px) {
  .support:has(figure) { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; margin-top: 32px; }
}
