/* Workflow dashboard — mission control layout */
:root {
  --wf-bg: #050810;
  --wf-surface: #0a1220;
  --wf-surface-2: #0f1a2e;
  --wf-border: rgba(148, 163, 184, 0.22);
  --wf-text: #e8f4ff;
  --wf-muted: #8aaabb;
  --wf-dim: #5a7a8a;
  --wf-accent: #00e5ff;
  --wf-accent-soft: rgba(0, 229, 255, 0.12);
  --wf-warn: #f59e0b;
  --wf-font-sans: "Space Grotesk", system-ui, sans-serif;
  --wf-font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--wf-font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--wf-text);
  background: var(--wf-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 229, 255, 0.08), transparent),
    linear-gradient(180deg, var(--wf-bg) 0%, #070b12 100%);
}

a {
  color: var(--wf-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wf-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}

.wf-header {
  margin-bottom: 1.25rem;
}

.wf-eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--wf-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wf-accent);
}

.wf-header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wf-lead {
  margin: 0;
  max-width: 52rem;
  color: var(--wf-muted);
  font-size: 0.95rem;
}

.wf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.wf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--wf-border);
  border-radius: 6px;
  background: var(--wf-surface);
  color: var(--wf-text);
  font-family: var(--wf-font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.wf-btn:hover {
  border-color: rgba(0, 229, 255, 0.35);
  text-decoration: none;
}

.wf-btn--primary {
  background: var(--wf-accent-soft);
  border-color: rgba(0, 229, 255, 0.35);
  color: var(--wf-accent);
}

.wf-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wf-layout {
  display: grid;
  grid-template-columns: minmax(200px, 220px) minmax(0, 1fr) minmax(240px, 300px);
  gap: 1rem;
  align-items: start;
  margin-top: 1.25rem;
  padding-bottom: 1rem;
}

.wf-lanes {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wf-lane-btn {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem 0.65rem 0.85rem;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  background: transparent;
  color: var(--wf-muted);
  font-family: var(--wf-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.wf-lane-btn:hover {
  background: var(--wf-surface);
  color: var(--wf-text);
}

.wf-lane-btn.is-active {
  border-left-color: var(--wf-accent);
  background: var(--wf-accent-soft);
  color: var(--wf-accent);
}

.wf-lane-btn.is-tour-highlight {
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.45);
}

.wf-lane-btn.is-tour-dim {
  opacity: 0.45;
}

.wf-stage-wrap {
  min-width: 0;
}

.wf-stage {
  border: 1px solid var(--wf-border);
  border-radius: 10px;
  background: var(--wf-surface);
  overflow: hidden;
}

.wf-stage-head {
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 1px solid var(--wf-border);
}

.wf-stage-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.wf-stage-summary {
  margin: 0 0 0.75rem;
  color: var(--wf-muted);
  font-size: 0.88rem;
}

.wf-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  font-family: var(--wf-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wf-dim);
}

.wf-pipeline-chip {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--wf-border);
  border-radius: 4px;
  background: var(--wf-surface-2);
  color: var(--wf-muted);
}

.wf-pipeline-arrow {
  color: var(--wf-dim);
}

.wf-stage-body {
  padding: 1rem 1.1rem 1.1rem;
}

.wf-stage-body .legal-notice-compact {
  margin-top: 0.85rem;
}

.wf-degraded {
  padding: 1.25rem;
  border: 1px dashed rgba(245, 158, 11, 0.45);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.06);
}

.wf-degraded h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--wf-warn);
}

.wf-degraded p {
  margin: 0 0 0.65rem;
  color: var(--wf-muted);
  font-size: 0.88rem;
}

.wf-link-cards {
  display: grid;
  gap: 0.65rem;
}

.wf-link-card {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--wf-border);
  border-radius: 8px;
  background: var(--wf-surface-2);
  color: var(--wf-text);
  text-decoration: none;
}

.wf-link-card:hover {
  border-color: rgba(0, 229, 255, 0.35);
  text-decoration: none;
}

.wf-link-card strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.92rem;
}

.wf-link-card span {
  color: var(--wf-muted);
  font-size: 0.82rem;
}

.wf-inspector {
  position: sticky;
  top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--wf-border);
  border-radius: 10px;
  background: var(--wf-surface);
}

.wf-inspector h3 {
  margin: 0 0 0.65rem;
  font-family: var(--wf-font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wf-dim);
}

.wf-inspector-section {
  margin-bottom: 1rem;
}

.wf-inspector-section:last-child {
  margin-bottom: 0;
}

.wf-inspector-label {
  margin: 0 0 0.4rem;
  font-family: var(--wf-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wf-dim);
}

.wf-artifact-card {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.45rem;
  border: 1px solid var(--wf-border);
  border-radius: 6px;
  background: var(--wf-surface-2);
  font-size: 0.82rem;
}

.wf-artifact-card:last-child {
  margin-bottom: 0;
}

.wf-artifact-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  font-size: 0.84rem;
}

.wf-artifact-meta {
  margin: 0 0 0.35rem;
  font-family: var(--wf-font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--wf-dim);
}

.wf-artifact-body {
  margin: 0;
  color: var(--wf-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.wf-inspector-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wf-inspector-links a {
  font-size: 0.82rem;
}

.wf-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.25rem;
  margin: 0 -1.25rem;
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--wf-border);
  background: var(--wf-surface);
  font-family: var(--wf-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wf-dim);
}

.wf-service {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.wf-service-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wf-dim);
}

.wf-service-dot.is-live {
  background: #39ff14;
  box-shadow: 0 0 6px rgba(57, 255, 20, 0.55);
  animation: wf-pulse 2s ease-in-out infinite;
}

.wf-service-dot.is-degraded {
  background: var(--wf-warn);
}

.wf-service-dot.is-pending {
  background: var(--wf-dim);
  animation: wf-pulse 1.2s ease-in-out infinite;
}

@keyframes wf-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.wf-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
}

.wf-tour-overlay.is-active {
  pointer-events: auto;
  background: rgba(5, 8, 16, 0.55);
}

.wf-tour-panel {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 2rem));
  padding: 1rem 1.1rem;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 10px;
  background: var(--wf-surface-2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.wf-tour-panel h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.wf-tour-panel p {
  margin: 0 0 0.85rem;
  color: var(--wf-muted);
  font-size: 0.88rem;
}

.wf-tour-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.wf-tour-step {
  margin-right: auto;
  font-family: var(--wf-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wf-dim);
}

.wf-event-notes-meta {
  margin: 0 0 0.65rem;
  font-family: var(--wf-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--wf-dim);
}

.wf-event-notes-list .markets-event-note {
  margin-bottom: 0.65rem;
}

.wf-event-notes-list .markets-event-note:last-child {
  margin-bottom: 0;
}

.wf-manifest-updated {
  margin-left: auto;
  font-size: 0.58rem;
  color: var(--wf-dim);
}

@media (max-width: 960px) {
  .wf-layout {
    grid-template-columns: 1fr;
  }

  .wf-lanes {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .wf-lane-btn {
    flex: 0 0 auto;
    width: auto;
    border-left: none;
    border-bottom: 3px solid transparent;
    border-radius: 6px 6px 0 0;
    white-space: nowrap;
  }

  .wf-lane-btn.is-active {
    border-left-color: transparent;
    border-bottom-color: var(--wf-accent);
  }

  .wf-inspector {
    position: static;
  }
}
