/* VITALS strip — web/css/vitals.css (per notes/specs/vitals.md, ## CSS) */

#vitals {
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
  position: relative;
  min-width: 0;
}

.vt-row {
  display: flex;
  gap: 1px; /* hairlines between tiles */
  background: var(--rule-2);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}

.vt-row::-webkit-scrollbar {
  display: none;
}

.vt {
  flex: 1 0 auto;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  row-gap: 1px;
  padding: 4px 6px;
  text-align: left;
  background: var(--panel);
  border: 0;
  color: var(--text);
  cursor: pointer;
  scroll-snap-align: start;
  font: inherit;
}

.vt:hover {
  background: var(--hover, #111);
}

.vt:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.vt-k {
  font: 600 12px/14px var(--sans);
  color: var(--dim);
  white-space: nowrap;
}

.vt-v {
  font: 600 14px/18px var(--mono);
  color: var(--text);
  white-space: nowrap;
}

.vt-v.up {
  color: var(--up);
}

.vt-v.dn {
  color: var(--down);
}

.vt-load {
  color: var(--dim);
}

.vt-f {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 400 12px/14px var(--mono);
  color: var(--dim);
  white-space: nowrap;
}

.vt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.t-exact {
  background: var(--up);
}

.t-approx {
  background: var(--orange);
}

.t-external {
  background: var(--cyan);
}

.t-reconstructed {
  background: var(--violet);
}

.is-stale .vt-dot {
  background: transparent;
  border: 1px solid var(--down);
}

.is-stale .vt-d {
  color: var(--down);
}

.vt-sp {
  width: 30px;
  height: 14px;
  flex: none;
}

.vt-pl {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.vt-sub {
  color: var(--dim);
}

#vitals.vt-more::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--panel));
}

.vt-hide-dense .vt[data-dense="0"] {
  display: none;
}

@media (max-width: 760px) {
  .vt {
    min-width: 112px;
    padding: 6px 10px; /* touch */
  }

  .vt-k {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vt-row {
    scroll-behavior: auto;
  }
}

/* Short desktop screens (e.g. 1280x720, 1366x768): two-row tiles (label + date/spark, then value) so the DESK still fits. */
@media (min-width: 1200px) and (max-height: 820px) {
  .vt { grid-template-columns: auto auto; grid-template-rows: auto auto; grid-template-areas: "k f" "v v"; column-gap: 8px; row-gap: 0; padding: 3px 8px; }
  .vt-k { grid-area: k; }
  .vt-f { grid-area: f; justify-self: end; }
  .vt-v { grid-area: v; }
}
