/* TSN Pulse Time — "Wire View" login overlay (additive, auth screen only).
   Active only while body.tsn-matrix is set by login-matrix.js.
   Self-contained: no external fonts, no CDNs, CSP-safe. */

/* ---------------------------------------------------------- stage */
body.tsn-matrix { background: #060a10 !important; }

#tsn-mx-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; display: block;
}

/* lift the auth card above the canvas */
body.tsn-matrix .card.narrow { position: relative; z-index: 1; }

/* ------------------------------------------------- auth card (glass) */
body.tsn-matrix .auth-card {
  /* scoped variable overrides — descendants (inputs, buttons) inherit */
  --surface: rgba(11, 16, 23, 0.82);
  --field: #0b1119;
  --border: rgba(53, 208, 160, 0.22);
  --text: #d7e7df;
  --muted: #6f8496;
  --blue: #35d0a0;            /* primary action goes pulse-green */
  --blue-ink: #04120d;
  background: var(--surface);
  border-color: var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55),
              0 0 0 1px rgba(53, 208, 160, 0.06),
              0 0 42px rgba(53, 208, 160, 0.07);
}
body.tsn-matrix .auth-card h1,
body.tsn-matrix .auth-card h2 { color: var(--text); }
body.tsn-matrix .auth-card button.primary {
  box-shadow: 0 2px 14px rgba(53, 208, 160, 0.35);
}

/* ------------------------------------------------- logo + slogan head */
.tsn-mx-head {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.55rem; margin: 0.2rem 0 1.1rem;
}
.tsn-mx-logochip {
  background: #ffffff; border-radius: 10px; padding: 7px 14px;
  line-height: 0; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.tsn-mx-logochip img { height: 34px; width: auto; display: block; }
.tsn-mx-slogan {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.82rem; letter-spacing: 0.34em; text-indent: 0.34em;
  text-transform: uppercase; color: #9fb4ac;
}
.tsn-mx-slogan span { color: #35d0a0; }

/* --------------------------------------------------------- HUD (left) */
.tsn-mx-hud {
  position: fixed; left: 1.1rem; bottom: 1rem; z-index: 2;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px; line-height: 1.75; color: #567566;
  user-select: none; pointer-events: none; white-space: pre;
}
.tsn-mx-hud b { color: #35d0a0; font-weight: 600; }

/* ------------------------------------------------ controls (right) */
.tsn-mx-ctl {
  position: fixed; right: 1.1rem; bottom: 1rem; z-index: 2;
  display: flex; flex-direction: column; gap: 0.45rem;
  background: rgba(11, 16, 23, 0.78);
  border: 1px solid rgba(53, 208, 160, 0.18);
  border-radius: 10px; padding: 0.65rem 0.85rem;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.tsn-mx-ctl-row {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 10.5px; letter-spacing: 0.1em; color: #6f8496;
  text-transform: uppercase;
}
.tsn-mx-ctl-row output {
  color: #35d0a0; min-width: 62px; text-align: right; letter-spacing: 0.02em;
}
#tsn-mx-rate {
  -webkit-appearance: none; appearance: none;
  width: 130px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #123528, #35d0a0);
  outline: none; cursor: pointer;
}
#tsn-mx-rate::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: #35d0a0; border: 2px solid #04120d;
  box-shadow: 0 0 10px rgba(53, 208, 160, 0.8);
}
#tsn-mx-rate::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: #35d0a0; border: 2px solid #04120d;
  box-shadow: 0 0 10px rgba(53, 208, 160, 0.8);
}
#tsn-mx-rate:focus-visible { outline: 2px solid #35d0a0; outline-offset: 3px; }

/* legend chips */
.tsn-mx-legend {
  display: flex; gap: 0.55rem; flex-wrap: wrap;
  font-size: 9.5px; letter-spacing: 0.06em; color: #6f8496;
}
.tsn-mx-legend i {
  font-style: normal; display: inline-flex; align-items: center; gap: 0.3rem;
}
.tsn-mx-legend i::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--dot, #5b6b78); box-shadow: 0 0 6px var(--dot, #5b6b78);
}

/* ------------------------------------------------ small screens / motion */
@media (max-width: 700px) {
  .tsn-mx-hud { display: none; }
  .tsn-mx-ctl { right: 0.6rem; bottom: 0.6rem; padding: 0.5rem 0.65rem; }
  .tsn-mx-legend { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tsn-mx-ctl { display: none; }
}
