.bg-mola {
  background: #1f3a5f;
}

.auth-card {
  max-width: 28rem;
}

.oauth-btn {
  font-weight: 500;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--bs-border-color);
}

.job-card.soon {
  opacity: 0.75;
}

.token-badge {
  font-variant-numeric: tabular-nums;
}

.storage-bar {
  height: 0.5rem;
  accent-color: #1f3a5f;
}

.disk-bar {
  display: block;
  border-radius: 0.25rem;
  overflow: hidden;
  background: var(--bs-tertiary-bg);
}

.disk-swatch {
  vertical-align: baseline;
}

.disk-recordings { fill: #1f3a5f; }
.disk-partial { fill: #4f9dde; }
.disk-results { fill: #2e8b57; }
.disk-archive { fill: #8a5cc2; }
.disk-other { fill: #8a8f98; }
.disk-free { fill: var(--bs-secondary-bg); stroke: var(--bs-border-color); stroke-width: 1; }

.upload-progress {
  height: 0.75rem;
}

.log-tail {
  max-height: 24rem;
  overflow: auto;
  font-size: 0.8rem;
  background: var(--bs-tertiary-bg);
}

/* A queued job's console appears with its first line. */
.log-tail:empty {
  display: none;
}

.result-thumb {
  max-width: 100%;
  height: auto;
}

.map-viewer {
  background: #111418;
  color: #e9ecef;
}

.map-viewer .form-select {
  width: auto;
}

/* No taller than wide: on a phone the page around it must stay reachable. */
.map-viewer-canvas {
  height: min(65vh, 80vw);
  min-height: 240px;
}

.map-viewer-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.map-viewer-canvas {
  position: relative;
}

/* Next to a plot, in half the width. */
.camera-viewer-canvas {
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: 70vh;
}

.pattern-preview {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
}

.d-contents {
  display: contents;
}

/* Columns inside such a wrapper (or two nested) keep the gutters of the row around it. */
.row > .d-contents > *,
.row > .d-contents > .d-contents > * {
  flex-shrink: 0;
  max-width: 100%;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-top: var(--bs-gutter-y);
}

.map-viewer-attribution {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 100%;
  padding: 1px 6px;
  font-size: 0.7rem;
  color: #e9ecef;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.map-viewer-status {
  color: #adb5bd;
}

/* Full screen: the native one, or a fixed overlay where the browser has none
   for page elements (iPhone). Separate rules: an unknown selector drops its rule. */
.map-viewer:fullscreen {
  display: flex;
  flex-direction: column;
}

.map-viewer:fullscreen .map-viewer-canvas {
  flex: 1;
  height: auto;
  min-height: 0;
}

.map-viewer-max {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  border-radius: 0 !important;
}

.map-viewer-max .map-viewer-canvas {
  flex: 1;
  height: auto;
  min-height: 0;
}

body.map-viewer-open {
  overflow: hidden;
}

.hint-touch {
  display: none;
}

@media (pointer: coarse) {
  .hint-touch {
    display: inline;
  }

  .hint-mouse {
    display: none;
  }
}

/* Job type icons on the "New job" cards: duotone, one accent color. */
.job-icon {
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: 0.5rem;
  color: #2f6fdb;
}
.job-icon svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.job-icon .fill {
  fill: rgba(47, 111, 219, 0.18);
}
.job-icon .solid {
  fill: currentColor;
  stroke: none;
}

/* Text results shown in place (job page), with simple syntax colors. */
.file-view summary {
  cursor: pointer;
  color: var(--bs-secondary-color);
}
.code-view {
  max-height: 28rem;
  overflow: auto;
  font-size: 0.78rem;
  background: var(--bs-tertiary-bg);
  white-space: pre;
}
.tok-key { color: #0b5394; }
.tok-str { color: #a31515; }
.tok-num { color: #09714f; }
.tok-lit { color: #7a3e9d; }
.tok-com { color: #6a737d; font-style: italic; }
.tok-punct { color: #6a737d; }

/* The printable markers on the calibration target page: crisp, not smoothed. */
.target-marker {
  image-rendering: pixelated;
  max-width: 100%;
  height: auto;
}

/* Legal texts: a readable measure, and room between sections. */
.legal-text {
  max-width: 48rem;
}
.legal-text h2 {
  margin-top: 1.5rem;
}

.map-viewer:fullscreen .camera-viewer-canvas {
  aspect-ratio: auto;
  max-height: none;
}

.map-viewer-max .camera-viewer-canvas {
  aspect-ratio: auto;
  max-height: none;
}
