:root {
  --fg: #fff;
  --dim: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.22);
  --bg: #000;
  /* The looks (assets/theme.js) set these on the page; these are NIGHT's. */
  --accent: #fff;
  --accent2: #fff;
  --accent3: #fff;
  --float: rgba(0, 0, 0, 0.62);
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 11px/1.45 var(--mono);
  letter-spacing: 0.06em;
}

a, button { color: inherit; text-decoration: none; font: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a:hover, button:hover { text-decoration: underline; }
button.on { text-decoration: underline; }
.colour .on, .quality .on, .lod .on { text-decoration: underline; }

.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 10px 14px 9px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
}
.bar .spacer { flex: 1; }
.bar .stat { color: var(--dim); font-variant-numeric: tabular-nums; }
/* The lines of the evolution (V1 · V2), the one shown underlined. */
.bar .lines a { color: var(--dim); }
.bar .lines a.on { color: var(--accent); text-decoration: underline; }

/* Lab: one screen, three columns — the live view, the field (map, progress, events), the specimen sheet.
   Columns scroll on their own; on narrow screens they stack and the page scrolls. */
.lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px) minmax(280px, 340px);
  gap: 14px;
  padding: 12px 14px;
  flex: 1;
  min-height: 0;
}
body.lab-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
body.lab-page .bar { position: static; }
.lab > * { min-width: 0; min-height: 0; overflow-y: auto; }
.lab .viewer { overflow: hidden; }

@media (max-width: 1100px) {
  body.lab-page { display: block; height: auto; overflow: auto; }
  .lab { grid-template-columns: minmax(0, 1fr); }
  .lab > * { overflow: visible; }
  .lab .stage { height: 70vh; }
}

.viewer { min-width: 0; }
.stage { position: relative; height: 100%; border: 1px solid var(--line); }
.stage canvas { display: block; width: 100%; height: 100%; }
.caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  text-transform: uppercase;
  color: var(--fg); /* the scene's sky is the look's background, so the page's ink reads on it */
  pointer-events: none;
}

h2 {
  font-size: 11px;
  font-weight: normal;
  letter-spacing: 0.12em;
  color: var(--dim);
  margin: 0 0 6px;
}
h2:not(:first-child) { margin-top: 14px; }

.map {
  display: grid;
  grid-template-columns: 56px repeat(4, minmax(0, 1fr));
  gap: 3px;
}
.map .head { color: var(--dim); text-transform: uppercase; align-self: end; padding-bottom: 1px; }
.map .row { color: var(--dim); text-transform: uppercase; align-self: center; }
.map .cell {
  position: relative;
  aspect-ratio: 1.6;
  border: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
}
.map .cell.empty { cursor: default; border-style: dashed; border-color: color-mix(in srgb, var(--fg) 10%, transparent); }
.map .cell svg { position: absolute; inset: 2px 2px 13px; width: calc(100% - 4px); height: calc(100% - 15px); }
.map .cell .d { position: absolute; left: 3px; bottom: 0; font-variant-numeric: tabular-nums; }
.map .cell.selected { border-color: var(--fg); outline: 1px solid var(--fg); }
.map .cell.fresh { animation: fresh 1.2s ease-out; }
@keyframes fresh { from { background: color-mix(in srgb, var(--accent3) 35%, transparent); } to { background: transparent; } }

.chart { display: block; width: 100%; height: 56px; }
.chart-note { margin: 6px 0 0; max-width: 68ch; color: var(--dim); font-size: 11px; line-height: 1.45; }
.chart-note b { font-weight: normal; }
.chart-note .m-best { color: var(--accent); }
.chart-note .m-mean { color: var(--accent2); }

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  font-variant-numeric: tabular-nums;
}
.log li { padding: 2px 0; border-top: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); color: var(--dim); }
.log li b { color: var(--fg); font-weight: normal; }

details.about { margin-top: 14px; color: var(--dim); }
details.about summary { cursor: pointer; text-transform: uppercase; }
details.about p { text-transform: none; }
.about { color: var(--dim); max-width: 64ch; margin-top: 22px; text-transform: none; }
details.about { max-width: none; margin-top: 14px; text-transform: uppercase; }
code { font: inherit; color: var(--fg); }

/* The site's long name next to its wordmark (front page). */
.bar .subtitle { color: var(--dim); }
