/* Conduit Telemetry — independent track-support visual system */

:root {
  --tp-ink: #101820;
  --tp-mute: #5F6E7A;
  --tp-fog: #E8EEF1;
  --tp-panel: #FFFFFF;
  --tp-line: rgba(16, 24, 32, 0.1);
  --tp-lime: #A8E10C;
  --tp-lime-deep: #7FB000;
  --tp-ice: #3DC4E0;
  --tp-void: #0A1218;
  --tp-warn: #FF6A3D;
  --font-display: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --tp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body.tp-body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--tp-ink);
  background:
    radial-gradient(800px 420px at 90% -5%, rgba(168, 225, 12, 0.14), transparent 55%),
    radial-gradient(700px 400px at 0% 40%, rgba(61, 196, 224, 0.1), transparent 50%),
    linear-gradient(180deg, #DCE6EB 0%, var(--tp-fog) 45%, #D5E0E6 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.tp-root { min-height: 100vh; display: flex; flex-direction: column; }
.page-main { flex: 1; }

.tp-board {
  position: relative;
  width: min(100% - 1.4rem, 1100px);
  margin: 0 auto;
  padding: 1.2rem 0 3rem;
  isolation: isolate;
}

.tp-grid-bg {
  position: absolute;
  inset: 0 -8% auto;
  height: 26rem;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(16, 24, 32, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 32, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000 30%, transparent);
}

/* Chrome */
.tp-chrome {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.tp-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.tp-mark em {
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  color: var(--tp-void);
  background: var(--tp-lime);
  border-radius: 0.35rem;
  box-shadow: 4px 4px 0 var(--tp-void);
  transition: transform 0.35s var(--tp-ease), box-shadow 0.35s var(--tp-ease);
}

.tp-mark:hover em {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--tp-void);
}

.tp-mark span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.tp-chrome-links {
  display: flex;
  gap: 0.15rem;
}

.tp-chrome-links a {
  text-decoration: none;
  color: var(--tp-ink);
  font-weight: 650;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.3rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.tp-chrome-links a:hover {
  background: rgba(168, 225, 12, 0.22);
  color: #4a7000;
}

.tp-kicker {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tp-ice);
}

/* Dashboard split */
.tp-dash {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 900px) {
  .tp-dash {
    grid-template-columns: 1fr 1.15fr;
    grid-template-areas: "console pipeline";
    gap: 1.5rem;
    align-items: stretch;
  }
  .tp-console { grid-area: console; }
  .tp-pipeline { grid-area: pipeline; }
}

.tp-console {
  padding: 1.5rem 1.4rem;
  background: var(--tp-void);
  color: #E8EEF1;
  border-radius: 0.45rem;
  box-shadow: 8px 8px 0 rgba(168, 225, 12, 0.55);
}

.tp-console h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 14ch;
}

.tp-lede {
  margin: 0 0 1.4rem;
  color: rgba(232, 238, 241, 0.7);
  line-height: 1.55;
  max-width: 34ch;
  font-size: 0.98rem;
}

.tp-form {
  display: grid;
  gap: 0.85rem;
}

.tp-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 238, 241, 0.5);
}

.tp-field input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid rgba(232, 238, 241, 0.18);
  border-radius: 0.35rem;
  background: rgba(232, 238, 241, 0.06);
  color: #fff;
  font: inherit;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.tp-field input::placeholder { color: rgba(232, 238, 241, 0.35); }

.tp-field input:focus {
  border-color: var(--tp-lime);
  box-shadow: 0 0 0 3px rgba(168, 225, 12, 0.2);
  background: rgba(168, 225, 12, 0.06);
}

.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.95rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 0.35rem;
  background: var(--tp-lime);
  color: var(--tp-void);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.35s var(--tp-ease), box-shadow 0.35s var(--tp-ease), background 0.25s ease;
  box-shadow: 4px 4px 0 rgba(61, 196, 224, 0.5);
}

.tp-btn i {
  width: 0.55rem;
  height: 0.55rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s var(--tp-ease);
}

.tp-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(61, 196, 224, 0.55);
  background: #b8ef2a;
}

.tp-btn:hover i { transform: rotate(45deg) translate(2px, -2px); }

.tp-btn-solid {
  background: var(--tp-ice);
  color: var(--tp-void);
  box-shadow: 4px 4px 0 rgba(16, 24, 32, 0.2);
  margin-top: 0.25rem;
  align-self: start;
}

.tp-btn-solid:hover {
  background: #55d4ec;
  box-shadow: 6px 6px 0 rgba(16, 24, 32, 0.25);
}

/* Pipeline chamber */
.tp-pipeline {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.35rem 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1.5px solid var(--tp-line);
  border-radius: 0.45rem;
  backdrop-filter: blur(8px);
}

.tp-pipe-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.tp-pipe-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tp-mute);
}

.tp-pipe-pct {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--tp-ink);
  font-variant-numeric: tabular-nums;
}

.tp-pipe-rail {
  position: relative;
  height: 0.45rem;
  background: rgba(16, 24, 32, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.tp-pipe-fill {
  display: block;
  height: 100%;
  width: var(--tp-pct, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tp-ice), var(--tp-lime));
  transition: width 1s var(--tp-ease);
}

.tp-pipe-pulse {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--tp-pct, 0%);
  width: 0.55rem;
  margin-left: -0.25rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px var(--tp-lime);
  opacity: 0;
  transition: left 1s var(--tp-ease);
}

[data-tp-live="1"] .tp-pipe-pulse {
  opacity: 1;
  animation: tp-pulse 1.6s ease-out infinite;
}

@keyframes tp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(168, 225, 12, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(168, 225, 12, 0); }
  100% { box-shadow: 0 0 0 0 rgba(168, 225, 12, 0); }
}

.tp-nodes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 560px) {
  .tp-nodes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.tp-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 0.85rem 1rem;
  background: rgba(16, 24, 32, 0.03);
  border: 1.5px solid var(--tp-line);
  border-radius: 0.4rem;
  opacity: 0.55;
  transition: opacity 0.4s ease, border-color 0.3s ease, background 0.3s ease, transform 0.4s var(--tp-ease);
}

.tp-node.is-on {
  opacity: 1;
  background: rgba(168, 225, 12, 0.1);
  border-color: rgba(168, 225, 12, 0.45);
}

.tp-node.is-now {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(168, 225, 12, 0.18);
  border-color: var(--tp-lime-deep);
}

.tp-node-code {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--tp-mute);
}

.tp-node.is-on .tp-node-code { color: var(--tp-lime-deep); }

.tp-node strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tp-node em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--tp-mute);
  line-height: 1.3;
}

.tp-node-orb {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(16, 24, 32, 0.15);
}

.tp-node.is-on .tp-node-orb {
  background: var(--tp-lime);
  box-shadow: 0 0 0 3px rgba(168, 225, 12, 0.25);
}

.tp-node.is-now .tp-node-orb {
  animation: tp-orb 1.2s ease-in-out infinite alternate;
}

@keyframes tp-orb {
  from { transform: scale(1); }
  to { transform: scale(1.35); }
}

/* Telemetry board */
.tp-telemetry {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.4rem 1.35rem 1.5rem;
  background: var(--tp-panel);
  border: 1.5px solid var(--tp-line);
  border-radius: 0.45rem;
  margin-bottom: 1.25rem;
  animation: tp-rise 0.55s var(--tp-ease);
}

@keyframes tp-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.tp-tele-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
}

.tp-tele-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
}

.tp-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tp-void);
  background: var(--tp-lime);
  border-radius: 0.3rem;
}

.tp-tele-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
  grid-template-areas:
    "amount"
    "pay"
    "lines"
    "manifest";
}

@media (min-width: 640px) {
  .tp-tele-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "amount pay lines"
      "manifest manifest manifest";
  }
}

.tp-cell-amount { grid-area: amount; }
.tp-cell-pay { grid-area: pay; }
.tp-cell-lines { grid-area: lines; }
.tp-cell-manifest { grid-area: manifest; }

.tp-cell {
  padding: 0.95rem 1rem;
  background: rgba(16, 24, 32, 0.03);
  border: 1px solid var(--tp-line);
  border-radius: 0.35rem;
}

.tp-cell dt {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tp-mute);
  margin-bottom: 0.25rem;
}

.tp-cell dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tp-mute {
  font-family: var(--font-body) !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  color: var(--tp-mute);
}

.tp-manifest {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

@media (min-width: 640px) {
  .tp-manifest {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tp-manifest li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  background: #fff;
  border: 1px solid var(--tp-line);
  border-radius: 0.3rem;
  font-size: 0.9rem;
  transition: border-color 0.25s ease, transform 0.3s var(--tp-ease);
}

.tp-manifest li:hover {
  border-color: rgba(61, 196, 224, 0.45);
  transform: translateX(3px);
}

.tp-manifest em {
  font-style: normal;
  font-weight: 700;
  color: var(--tp-ice);
  font-variant-numeric: tabular-nums;
}

/* Miss */
.tp-miss {
  position: relative;
  z-index: 2;
  padding: 1.5rem 1.35rem;
  margin-bottom: 1.25rem;
  background: rgba(255, 106, 61, 0.08);
  border: 1.5px solid rgba(255, 106, 61, 0.35);
  border-radius: 0.45rem;
  animation: tp-rise 0.55s var(--tp-ease);
}

.tp-miss .tp-kicker { color: var(--tp-warn); }

.tp-miss h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tp-miss p {
  margin: 0 0 0.75rem;
  color: var(--tp-mute);
}

.tp-textlink {
  font-weight: 700;
  color: var(--tp-ice);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.tp-textlink:hover {
  color: var(--tp-warn);
  border-bottom-color: var(--tp-warn);
}

/* Routes */
.tp-routes {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 720px) {
  .tp-routes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tp-routes a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid var(--tp-line);
  border-radius: 0.35rem;
  transition: transform 0.35s var(--tp-ease), border-color 0.25s ease, background 0.25s ease, box-shadow 0.35s var(--tp-ease);
}

.tp-routes a span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tp-mute);
}

.tp-routes a strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tp-routes a:hover {
  transform: translateY(-3px);
  border-color: var(--tp-void);
  background: var(--tp-void);
  color: #fff;
  box-shadow: 4px 4px 0 var(--tp-lime);
}

.tp-routes a:hover span { color: rgba(255, 255, 255, 0.5); }

.tp-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
  font-size: 0.82rem;
  color: var(--tp-mute);
  border-top: 1px solid var(--tp-line);
}

.tp-foot a {
  color: var(--tp-ink);
  font-weight: 700;
  text-decoration: none;
  margin-left: 0.75rem;
}

.tp-foot a:hover { color: var(--tp-lime-deep); }

@media (prefers-reduced-motion: reduce) {
  .tp-pipe-pulse,
  .tp-node.is-now .tp-node-orb { animation: none; }
  .tp-telemetry,
  .tp-miss { animation: none; }
}
