/* ELVORA COLLECTION — Dispatch Meridian (track — split pane + asymmetric helix stepper) */

.page-track .page-main {
  background: var(--surface-0);
  overflow-x: clip;
}

.etm-root {
  --etm-inset: clamp(1rem, 3vw, 2rem);
  --etm-console: minmax(280px, 360px);
}

/* ══════════════════════════════════════
   BAND — compact editorial header
   ══════════════════════════════════════ */
.etm-band {
  position: relative;
  padding: clamp(28px, 4vw, 44px) var(--etm-inset) clamp(20px, 3vw, 28px);
  background:
    linear-gradient(135deg, rgba(26, 58, 92, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, var(--surface-1) 0%, var(--surface-0) 100%);
  border-bottom: 1px solid var(--line-soft);
}

.etm-band-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 12px 24px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: end;
}

.etm-crumb {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.etm-crumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.etm-crumb a:hover { color: var(--vault); }
.etm-crumb [aria-current] { color: var(--vault-deep); font-weight: 700; }

.etm-kicker {
  margin: 0 0 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre-deep);
}

.etm-band h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--vault-deep);
}

.etm-accent {
  background: linear-gradient(120deg, #1a3a5c 0%, var(--vault) 50%, var(--ochre-deep) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: etmAccentFlow 8s ease-in-out infinite alternate;
}

@keyframes etmAccentFlow {
  from { background-position: 0% center; }
  to { background-position: 100% center; }
}

.etm-band-stats {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.etm-band-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-xs);
}

.etm-band-stats strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--vault-deep);
  line-height: 1;
}

.etm-band-stats span {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.etm-stat-live strong {
  color: #15803d;
}

.etm-stat-live {
  position: relative;
}

.etm-stat-live::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: etmLiveBlink 2s ease-in-out infinite;
}

@keyframes etmLiveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ══════════════════════════════════════
   STAGE — split horizontal pane
   ══════════════════════════════════════ */
.etm-stage {
  padding: clamp(24px, 4vw, 40px) var(--etm-inset) clamp(32px, 5vw, 48px);
}

.etm-split {
  display: grid;
  grid-template-columns: var(--etm-console) minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 24px);
  max-width: 1200px;
  margin: 0 auto;
  min-height: min(72vh, 640px);
}

/* Left — signal console */
.etm-console {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(22px, 3vw, 28px);
  border-radius: var(--radius-2xl);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: calc(var(--loom-seal, 80px) + 16px);
}

.etm-console-glow {
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(26, 58, 92, 0.12), transparent 70%);
  pointer-events: none;
}

.etm-console-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.etm-console-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #1a3a5c, var(--vault-deep));
  color: var(--ochre);
  font-size: 1.2rem;
  box-shadow: 0 8px 24px rgba(26, 58, 92, 0.28);
}

.etm-console-head h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--vault-deep);
}

.etm-console-head p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.etm-field {
  position: relative;
  z-index: 1;
}

.etm-field input {
  width: 100%;
  padding: 20px 16px 10px;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--surface-1);
  font-size: 0.95rem;
  color: var(--ink);
  transition: background 0.25s;
}

.etm-field input:focus {
  outline: none;
  background: var(--surface-0);
}

.etm-field label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
  transition: top 0.2s, font-size 0.2s, color 0.2s;
}

.etm-field input:focus + label,
.etm-field input:not(:placeholder-shown) + label {
  top: 12px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a3a5c;
}

.etm-field-line {
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #1a3a5c, var(--ochre));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.etm-field input:focus ~ .etm-field-line {
  transform: scaleX(1);
}

.etm-trace {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 24px;
  border: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--vault), var(--vault-deep));
  color: var(--on-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(74, 28, 50, 0.28);
  transition: transform 0.25s, box-shadow 0.25s;
}

.etm-trace:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(74, 28, 50, 0.35);
}

.etm-trace-ring {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(212, 162, 76, 0.45);
  opacity: 0;
  animation: etmTraceRing 2.5s ease-out infinite;
}

@keyframes etmTraceRing {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

.etm-console-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

/* Right — status theater */
.etm-theater {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-2xl);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-md);
  transition: border-color 0.4s, box-shadow 0.4s;
}

.etm-theater--found {
  border-color: rgba(212, 162, 76, 0.35);
  background:
    linear-gradient(160deg, rgba(212, 162, 76, 0.06) 0%, transparent 40%),
    var(--surface-2);
}

.etm-theater--miss {
  border-color: rgba(196, 64, 64, 0.22);
  background: linear-gradient(180deg, rgba(255, 248, 248, 0.5), var(--surface-2));
}

.etm-theater-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 28px);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.etm-signal-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: rgba(26, 58, 92, 0.08);
  border: 1px solid rgba(26, 58, 92, 0.15);
}

.etm-signal-badge em {
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a3a5c;
}

.etm-signal-pulse {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(212, 162, 76, 0.5);
  animation: etmSignalPulse 2s ease-out infinite;
}

.etm-signal-pulse-2 {
  animation-delay: 0.6s;
}

@keyframes etmSignalPulse {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.15); }
}

.etm-theater-meta {
  flex: 1;
  min-width: 160px;
}

.etm-theater-meta h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--vault-deep);
}

.etm-theater-meta p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.etm-orbit-gauge {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}

.etm-orbit-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.etm-gauge-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 5;
}

.etm-gauge-fill {
  fill: none;
  stroke: url(#etmGaugeGrad);
  stroke: var(--ochre);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 214;
  stroke-dashoffset: calc(214 - (214 * var(--etm-pct, 0) / 100));
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 6px rgba(212, 162, 76, 0.4));
}

.etm-orbit-gauge > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--vault);
}

/* Asymmetric helix stepper */
.etm-helix {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 8px 0 16px;
  list-style: none;
}

.etm-helix-spine {
  position: absolute;
  left: 50%;
  top: 24px;
  bottom: 24px;
  width: 4px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: var(--line-soft);
  overflow: hidden;
}

.etm-helix-fill {
  display: block;
  width: 100%;
  height: calc((var(--etm-step, 1) - 1) * 33.33% + 16%);
  max-height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #1a3a5c, var(--ochre));
  transition: height 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(212, 162, 76, 0.35);
}

.etm-helix-step {
  position: relative;
  display: flex;
  width: 50%;
  padding: 10px 0;
  animation: etmStepIn 0.5s var(--ease-out) both;
  animation-delay: calc(var(--step-i) * 100ms + 200ms);
}

@keyframes etmStepIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.etm-helix-step.side-left {
  align-self: flex-start;
  justify-content: flex-end;
  padding-right: calc(50% + 20px);
}

.etm-helix-step.side-right {
  align-self: flex-end;
  justify-content: flex-start;
  padding-left: calc(50% + 20px);
}

.etm-step-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 280px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s, background 0.35s;
}

.etm-helix-step.is-done .etm-step-card {
  border-color: rgba(212, 162, 76, 0.25);
  background: rgba(212, 162, 76, 0.06);
}

.etm-helix-step.is-active .etm-step-card {
  border-color: var(--ochre);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.etm-step-node {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.etm-step-node i {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-0);
  border: 2px solid var(--line);
  font-style: normal;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: background 0.35s, border-color 0.35s, color 0.35s;
}

.etm-helix-step.is-done .etm-step-node i {
  background: rgba(212, 162, 76, 0.15);
  border-color: var(--ochre);
  color: var(--ochre-deep);
}

.etm-helix-step.is-active .etm-step-node i {
  background: linear-gradient(145deg, var(--ochre), #f0c96a);
  border-color: var(--ochre);
  color: var(--vault-deep);
}

.etm-step-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(212, 162, 76, 0.55);
  animation: etmStepRing 2s ease-out infinite;
}

.etm-step-ring-2 {
  animation-delay: 0.7s;
}

@keyframes etmStepRing {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.45); }
}

.etm-step-copy strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.etm-helix-step.is-done .etm-step-copy strong,
.etm-helix-step.is-active .etm-step-copy strong {
  color: var(--vault-deep);
}

.etm-helix-step.is-active .etm-step-copy strong {
  color: var(--ochre-deep);
}

.etm-step-copy p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.etm-helix-step.is-active .etm-step-copy p {
  color: var(--text-secondary);
}

.etm-theater-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.etm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}

.etm-btn-solid {
  background: linear-gradient(135deg, var(--ochre), #f0c96a);
  color: var(--vault-deep);
  box-shadow: 0 6px 20px rgba(212, 162, 76, 0.3);
}

.etm-btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(212, 162, 76, 0.4);
}

.etm-btn-soft {
  border: 1.5px solid var(--line);
  background: var(--surface-0);
  color: var(--vault);
}

.etm-btn-soft:hover {
  border-color: var(--vault);
  transform: translateY(-2px);
}

/* Idle / miss panels */
.etm-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(24px, 4vw, 40px);
}

.etm-panel h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 600;
  color: var(--vault-deep);
}

.etm-panel p {
  margin: 0;
  max-width: 40ch;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.etm-idle-helix {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-left: 24px;
}

.etm-idle-helix::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--line), transparent);
  transform: translateX(-50%);
}

.etm-idle-helix span {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-1);
  border: 2px dashed var(--line);
  font-size: 0.9rem;
  color: var(--text-muted);
  animation: etmIdleFloat 3s ease-in-out infinite;
  animation-delay: calc(var(--idle-i) * 0.35s);
}

.etm-idle-helix span:nth-child(odd) { margin-right: 48px; }
.etm-idle-helix span:nth-child(even) { margin-left: 48px; }

@keyframes etmIdleFloat {
  0%, 100% { opacity: 0.45; border-color: var(--line); }
  50% { opacity: 1; border-color: var(--ochre); color: var(--ochre-deep); transform: scale(1.06); }
}

.etm-idle-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.etm-idle-preview span {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.etm-idle-preview em {
  font-style: normal;
  margin-right: 4px;
  color: var(--ochre-deep);
}

.etm-miss-orbit {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
}

.etm-miss-orbit::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(196, 64, 64, 0.35);
  animation: etmMissSpin 10s linear infinite;
}

@keyframes etmMissSpin {
  to { transform: rotate(360deg); }
}

.etm-miss-orbit span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(196, 64, 64, 0.1);
  border: 2px solid rgba(196, 64, 64, 0.25);
  color: #c44040;
  font-size: 1.4rem;
  font-weight: 800;
}

.etm-panel-miss h2 { color: #8b2e2e; }

.etm-miss-tips {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  max-width: 36ch;
}

.etm-miss-tips li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.etm-miss-tips li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--ochre-deep);
  font-weight: 700;
}

/* Ribbon links */
.etm-ribbon {
  padding: 0 var(--etm-inset) clamp(56px, 8vw, 88px);
}

.etm-ribbon-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}

.etm-ribbon-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
  padding: 16px 20px;
  border-radius: var(--radius-xl);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
  animation: etmRibIn 0.5s var(--ease-out) both;
  animation-delay: calc(var(--rib-i) * 70ms);
}

@keyframes etmRibIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.etm-ribbon-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26, 58, 92, 0.2);
}

.etm-ribbon-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #1a3a5c, var(--vault-deep));
  color: var(--ochre);
  font-size: 1.05rem;
}

.etm-ribbon-copy strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--vault-deep);
  word-break: break-word;
}

.etm-ribbon-copy small {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  .etm-band-inner {
    grid-template-columns: 1fr;
  }

  .etm-band-stats {
    justify-content: flex-start;
  }

  .etm-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .etm-console {
    position: static;
  }

  .etm-helix-step.side-left,
  .etm-helix-step.side-right {
    width: 100%;
    padding-left: 56px;
    padding-right: 0;
    align-self: stretch;
    justify-content: flex-start;
  }

  .etm-helix-spine {
    left: 22px;
    transform: none;
  }
}

@media (max-width: 560px) {
  .etm-theater-head {
    flex-direction: column;
  }

  .etm-idle-helix span:nth-child(odd),
  .etm-idle-helix span:nth-child(even) {
    margin: 0;
  }

  .etm-ribbon-card {
    min-width: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .etm-accent,
  .etm-stat-live::before,
  .etm-trace-ring,
  .etm-signal-pulse,
  .etm-step-ring,
  .etm-idle-helix span,
  .etm-miss-orbit::before,
  .etm-ribbon-card,
  .etm-helix-step {
    animation: none !important;
  }

  .etm-gauge-fill,
  .etm-helix-fill {
    transition: none;
  }
}
