:root {
  --bg: #07070a;
  --ink: #e9e4da;
  --dim: #6d6a73;
  --faint: #24232a;
  --accent: #f2b25c;
  --error: #f08a7e;
  --pixel: 6px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 13px/1.6 ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--dim); }
a:hover { border-bottom-color: var(--ink); }

/* The wordmark, drawn in whole pixels by wordmark.js */
.wordmark { display: block; image-rendering: pixelated; shape-rendering: crispEdges; }
.wordmark rect { fill: var(--ink); }

/* The game: fit_canvas_to_parent makes the canvas fill this, so its size mustn't depend on the canvas */
#holder { position: fixed; inset: 0; }
canvas { display: block; outline: none; }

#loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.6s ease;
}
#loader.gone { opacity: 0; pointer-events: none; }

.center { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 0 16px; }

.subtitle { margin-top: -14px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.3em; font-size: 11px; }

/* Whole pixels: the bar fills in steps of one */
.bar { width: 240px; height: 4px; background: var(--faint); }
.bar .fill { height: 100%; width: 0; background: var(--ink); }
.bar.waiting .fill { width: 100%; background: var(--dim); animation: pulse 1.2s steps(4) infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.status { margin: 0; min-height: 1.6em; color: var(--dim); text-align: center; white-space: pre-line; max-width: 34em; }
.status.error { color: var(--error); }

.suggest {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  margin: 0;
  padding: 0 16px;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
}
.suggest a { color: var(--dim); border-bottom-color: var(--faint); }
.suggest a:hover { color: var(--ink); border-bottom-color: var(--dim); }

/* The download page */
.page { min-height: 100%; display: grid; place-items: center; padding: 48px 16px; }
.page .center { gap: 32px; width: 100%; max-width: 30em; }
.lede { margin: 0; color: var(--dim); text-align: center; }
.downloads { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.download {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  transition: border-color 0.15s;
}
.download:hover { border-color: var(--ink); }
.download .name { font-size: 15px; }
.download .name::after { content: " \2193"; color: var(--accent); }
.download .meta { color: var(--dim); font-size: 12px; text-align: right; }
.note { margin: 0; color: var(--dim); font-size: 12px; text-align: center; }
.back { color: var(--dim); border-bottom-color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  #loader { transition: none; }
  .bar.waiting .fill { animation: none; }
}
