/* ============================================================
   DEPTH GAUGE — the instrument that reads the descent.
   Graduations sit left of the sounding line; the needle and its
   live readout own the space to the right, so the digits can
   never collide with a tick at any depth.
   ============================================================ */

.gauge {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail);
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 6.5rem 0 2.5rem;
  border-right: 1px solid var(--line-2);
  pointer-events: none;
}
@media (min-width: 960px) { .gauge { display: flex; } }

.gauge-track {
  position: relative;
  flex: 1;
  width: 100%;
}

/* the sounding line itself */
.gauge-track::before {
  content: "";
  position: absolute;
  left: 26px; top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}

/* minor graduations, every 12px */
.gauge-ticks {
  position: absolute;
  left: 15px; width: 11px;
  top: 0; bottom: 0;
  background-image: linear-gradient(to bottom, var(--line) 0 1px, transparent 1px);
  background-size: 100% 12px;
}

.gauge-major {
  position: absolute;
  left: 6px;
  width: 20px; height: 1px;
  background: var(--ink-3);
  opacity: 0.5;
  transform: translateY(-50%);
}

.gauge-needle {
  position: absolute;
  left: 26px;
  right: 2px;
  top: 0;
  height: 1px;
  background: var(--accent);
  transition: top 120ms linear;
  will-change: top;
}
.gauge-needle::after {
  content: "";
  position: absolute;
  left: -3px; top: -3px;
  width: 7px; height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* tucked just under the needle rather than centred on it, so the
   digits are never bisected by the line they belong to */
.gauge-readout {
  position: absolute;
  left: 26px;
  padding-left: 9px;
  transform: translateY(3px);
  transition: top 120ms linear;
  will-change: top;
  white-space: nowrap;
}
.gauge-readout b {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.gauge-readout small {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.gauge-cap {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  writing-mode: vertical-rl;
  margin-top: 1.25rem;
}
