:root {
  color-scheme: dark;
  --ink: #f2f2f2;
  --dim: #8a8a8a;
  --paper: #000;
  --amber: #ffb000;
  --line: #333;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}

a {
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

.hunt {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(100%, 110ch);
  margin: 0 auto;
  padding: 16px;
}

.hunt h1,
.hunt h2 {
  margin: 0 0 6px;
  font-size: inherit;
  font-weight: normal;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hunt p {
  margin: 0 0 10px;
  max-width: 80ch;
}

.banner {
  margin: 0 0 8px;
  color: var(--amber);
}

pre {
  margin: 0;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

pre.table {
  white-space: pre;
  overflow-x: auto;
}

.muted {
  color: var(--dim);
}

.small {
  font-size: 0.85em;
}

.status {
  margin: 0;
  min-height: 1.5em;
}

.error {
  color: var(--amber);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

.controls label {
  display: flex;
  gap: 8px;
  align-items: center;
}

input[type="range"] {
  accent-color: var(--amber);
}

button {
  padding: 8px 12px;
  border: 1px solid var(--dim);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: var(--ink);
}

button:disabled {
  color: var(--dim);
  cursor: default;
}

button:focus-visible,
input:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 760px) {
  .panels {
    grid-template-columns: 1fr;
  }
}

.spectrogram {
  position: relative;
  margin: 0;
}

.spectrogram canvas {
  display: block;
  width: 100%;
  height: 320px;
  border: 1px solid var(--line);
}

.spectrogram .overlay {
  position: absolute;
  inset: 0 0 auto 0;
  pointer-events: none;
  border-color: transparent;
}

.map {
  height: 320px;
  border: 1px solid var(--line);
  background: #111;
}

.map.pinning {
  cursor: crosshair;
}

/* Inverted OSM tiles so the map sits in the black page; overlays stay in true colour. */
.osm-tiles {
  filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9);
}

.heatmap {
  image-rendering: pixelated;
}

.leaflet-container {
  font: inherit;
  background: #111;
}

.leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.7) !important;
  color: var(--dim);
}

.leaflet-control-attribution a,
.leaflet-bar a {
  color: var(--ink) !important;
  background: #000 !important;
}

.map-label {
  background: #000;
  color: var(--ink);
  border: 1px solid var(--dim);
  box-shadow: none;
  font: inherit;
}

.reveal {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

footer {
  color: var(--dim);
  padding: 24px 0;
  max-width: 80ch;
}

footer a {
  color: var(--dim);
}
