/* MOTUS TRAX · the vessel standard, for the static song pages.
   Every stat is a stock: a vessel of dark liquid filled to where the
   number stands against its next Motus milestone, with the flow line
   floating above the surface. The liquid is drawn by trax.js; nothing
   here paints a second one over it. */
.tx {
  --cy: 127, 233, 245;
  --ro: 255, 154, 210;
  --vi: 169, 155, 255;
  --rim: var(--cy);
  --cut: 11px;
  display: flex; flex-direction: column; gap: 14px;
  width: 100%; max-width: 420px; margin: 0 auto;
  font-family: Unbounded, Outfit, system-ui, sans-serif;
  color: #f7f5ef;
}
.tx.vh-ro { --rim: var(--ro); }
.tx.vh-vi { --rim: var(--vi); }
.tx-tag {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
}
.tx-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--rim)); box-shadow: 0 0 10px rgba(var(--rim), .9); }

/* ── THE VESSEL ── */
.tx-vessel { display: flex; flex-direction: column; gap: 8px; }
.tx-glass {
  position: relative; height: 128px; border-radius: 38px; overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 6, 28, .55), rgba(5, 3, 16, .72));
  box-shadow: inset 0 0 0 1px rgba(var(--rim), .26), inset 0 8px 22px rgba(0, 0, 0, .55), inset 0 -3px 16px rgba(var(--rim), .07);
}
.tx-ferro { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
/* gauge ticks down the right wall */
.tx-ticks {
  position: absolute; top: 6px; bottom: 6px; right: 7px; width: 7px; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(var(--rim), .34) 0 1px, transparent 1px 12px);
}
/* THE FLOW — the last month of mornings, in the air above the surface.
   It stops short of the delta so the line never strikes through its own reading. */
.tx-flow { position: absolute; left: 12px; top: 11px; width: calc(100% - 128px); height: 28px; z-index: 2; overflow: visible; }
.tx-flow polyline { fill: none; stroke: rgb(var(--rim)); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(var(--rim), .9)); }
.tx-flow circle { fill: #fff; filter: drop-shadow(0 0 5px rgba(var(--rim), 1)); }
.tx-delta {
  position: absolute; top: 8px; right: 20px; z-index: 3;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #cdbcff;
}
.tx-delta.up { color: rgb(var(--rim)); text-shadow: 0 0 12px rgba(var(--rim), .8); }
.tx-read { position: absolute; left: 20px; bottom: 14px; z-index: 3; display: flex; align-items: baseline; gap: 9px; }
.tx-read b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 2px 22px rgba(0, 0, 0, .7); }
.tx-read i { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.tx-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.tx-rail { display: flex; gap: 6px; }
.tx-rail i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .22); transition: background 400ms, transform 400ms; }
.tx-rail i.on { background: rgb(var(--rim)); transform: scale(1.3); box-shadow: 0 0 9px rgba(var(--rim), .9); }

/* ── THE MOTUS METER — always 0 to 111 ── */
.tx-meter { display: flex; flex-direction: column; gap: 9px; }
.tx-mhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tx-mhead span { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.tx-mhead b { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: rgb(var(--ro)); text-shadow: 0 0 26px rgba(var(--ro), .55); }
.tx-mhead b i { font-style: normal; font-size: 12px; font-weight: 700; opacity: .9; }
/* THE VEIN — the same liquid, lying down */
.tx-vein { position: relative; height: 16px; border-radius: 10px; overflow: hidden; background: linear-gradient(180deg, rgba(10, 6, 28, .6), rgba(5, 3, 16, .8)); box-shadow: inset 0 0 0 1px rgba(var(--ro), .24); }
.tx-vein-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(var(--ro), .35), rgba(var(--ro), .95)); transition: width 2400ms cubic-bezier(.16, .84, .28, 1); }
.tx-vein-mark { position: absolute; right: 6px; top: 3px; bottom: 3px; width: 2px; background: rgba(255, 255, 255, .5); }
.tx-dial { width: 100%; height: 26px; appearance: none; -webkit-appearance: none; background: none; }
.tx-dial::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgba(var(--ro), .9) var(--at, 0%), rgba(255, 255, 255, .16) var(--at, 0%)); }
.tx-dial::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgba(var(--ro), .9) var(--at, 0%), rgba(255, 255, 255, .16) var(--at, 0%)); }
/* the thumb is a droplet of the liquid */
.tx-dial::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; background: #07040f; border: 1.4px solid rgb(var(--ro)); border-radius: 50% 50% 50% 4px; transform: rotate(45deg); box-shadow: 0 0 12px rgba(var(--ro), .7); }
.tx-dial::-moz-range-thumb { width: 18px; height: 18px; background: #07040f; border: 1.4px solid rgb(var(--ro)); border-radius: 50% 50% 50% 4px; transform: rotate(45deg); box-shadow: 0 0 12px rgba(var(--ro), .7); }
.tx-dial:focus-visible { outline: 3px solid #f7f5ef; outline-offset: 4px; }
.tx-cast { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tx-mcount { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* ── THE ENERGY GATE — the only button shape. Pills are banned. ── */
.gate {
  --cy: 127, 233, 245; --ro: 255, 154, 210; --vi: 169, 155, 255;
  --rim: var(--cy); --cut: 11px;
  position: relative; display: inline-flex; border: 0; padding: 0; background: none; cursor: pointer;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  filter: drop-shadow(0 0 10px rgba(var(--rim), .3));
  transition: transform 260ms cubic-bezier(.2, .8, .2, 1), filter 260ms;
  -webkit-tap-highlight-color: transparent;
}
.gate:hover:not(:disabled), .gate:focus-visible { transform: translateY(-1px); filter: drop-shadow(0 0 18px rgba(var(--rim), .6)); }
.gate:active { transform: scale(.97); }
.gate::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(150deg, rgba(var(--rim), .85), rgba(var(--vi), .5) 55%, rgba(var(--rim), .3)); }
.gate-in {
  position: relative; z-index: 1; margin: 1.4px; padding: 11px 16px; overflow: hidden;
  clip-path: polygon(calc(var(--cut) - 1px) 0, 100% 0, 100% calc(100% - var(--cut) + 1px), calc(100% - var(--cut) + 1px) 100%, 0 100%, 0 calc(var(--cut) - 1px));
  background: linear-gradient(165deg, rgba(10, 6, 30, .97), rgba(4, 2, 16, .99));
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: #f7f5ef;
}
/* behind the plate, the liquid rises to meet a touch */
.gate-in::before {
  content: ''; position: absolute; left: -10%; right: -10%; bottom: 0; height: 150%; z-index: -1;
  background: radial-gradient(60% 40% at 50% 100%, rgba(var(--rim), .5), transparent 70%);
  transform: translateY(72%); transition: transform 800ms cubic-bezier(.16, .84, .28, 1);
}
.gate:hover .gate-in::before, .gate:focus-visible .gate-in::before, .gate.did .gate-in::before { transform: translateY(18%); }
.gate.did .gate-in { background: linear-gradient(150deg, rgba(var(--rim), .95), rgba(var(--rim), .7)); color: #04020c; }
.gate.rose { --rim: var(--ro); }
.gate:disabled { cursor: default; filter: none; opacity: .75; }

@media (prefers-reduced-motion: reduce) {
  .tx-vein-fill, .gate, .gate-in::before, .tx-rail i { transition: none; }
}
