:root {
  --bg: #06111f;
  --bg-deep: #030b14;
  --panel: rgba(10, 28, 48, 0.93);
  --panel-soft: rgba(14, 37, 62, 0.78);
  --panel-strong: rgba(8, 25, 44, 0.98);
  --border: rgba(100, 178, 255, 0.17);
  --border-bright: rgba(77, 176, 255, 0.38);
  --text: #f4f8fc;
  --muted: #90a7bb;
  --faint: #657b91;
  --cyan: #4ddcff;
  --blue: #4098ff;
  --green: #38e5aa;
  --yellow: #ffc857;
  --red: #ff657a;
  --purple: #9d78ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 20px;
  --radius-small: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-deep);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 5%, rgba(22, 103, 180, 0.26), transparent 28%),
    radial-gradient(circle at 90% 9%, rgba(104, 67, 210, 0.18), transparent 26%),
    linear-gradient(180deg, #071425 0%, #04101d 55%, #020912 100%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.background-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(74, 151, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 151, 220, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.background-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.14;
  pointer-events: none;
}

.glow-one {
  top: 20%;
  left: -160px;
  background: var(--blue);
}

.glow-two {
  top: 5%;
  right: -160px;
  background: var(--purple);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1520px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 50px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(7, 23, 40, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: white;
  background:
    linear-gradient(145deg, rgba(77, 220, 255, 0.95), rgba(64, 95, 255, 0.82));
  box-shadow:
    0 12px 28px rgba(54, 151, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.topbar h1,
.topbar p,
.hero-card h2,
.hero-card p,
.section-heading h2,
.section-heading h3,
.section-heading p {
  margin: 0;
}

.topbar h1 {
  margin-top: 4px;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.topbar p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  color: #7d9ab5;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.cyan {
  color: var(--cyan);
}

.topbar-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: #dceafa;
  background: rgba(16, 44, 73, 0.9);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: var(--border-bright);
  background: rgba(22, 57, 93, 0.98);
}

.button.primary {
  border-color: rgba(84, 187, 255, 0.55);
  color: white;
  background:
    linear-gradient(135deg, #268ff6, #3775ff);
  box-shadow: 0 10px 24px rgba(43, 128, 255, 0.23);
}

.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.75rem;
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 14px currentColor;
}

.connection-badge.online {
  color: var(--green);
  border-color: rgba(56, 229, 170, 0.3);
  background: rgba(26, 116, 88, 0.15);
}

.connection-badge.online .status-dot {
  background: var(--green);
}

.connection-badge.warning,
.connection-badge.waiting {
  color: var(--yellow);
  border-color: rgba(255, 200, 87, 0.3);
  background: rgba(128, 91, 20, 0.16);
}

.connection-badge.offline {
  color: var(--red);
  border-color: rgba(255, 101, 122, 0.3);
  background: rgba(126, 35, 51, 0.16);
}

.connection-badge.offline .status-dot {
  background: var(--red);
}

.hero-grid,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.hero-card,
.command-card,
.panel,
.section-block,
.action-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(15, 47, 78, 0.94), rgba(8, 27, 48, 0.94));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  min-height: 280px;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -50px;
  width: 300px;
  height: 300px;
  border-radius: 48%;
  background:
    radial-gradient(circle, rgba(91, 87, 255, 0.22), transparent 65%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 36px;
}

.hero-content h2 {
  max-width: 780px;
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 800px;
  margin-top: 18px;
  color: #a9bdd0;
  font-size: 1rem;
  line-height: 1.65;
}

.hero-actions {
  margin-top: 28px;
}

.hero-health {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 20px;
  border-left: 1px solid var(--border);
  background: rgba(5, 19, 35, 0.54);
}

.hero-health-item {
  padding: 18px;
  border: 1px solid rgba(114, 178, 235, 0.14);
  border-radius: 14px;
  background: rgba(8, 27, 49, 0.78);
}

.hero-health-item span,
.task-details span,
.metric-card span,
.infrastructure-facts span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-health-item strong {
  display: block;
  margin-top: 8px;
  font-size: 1.05rem;
}

.command-card {
  padding: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-top: 5px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.section-heading h3 {
  margin-top: 5px;
  font-size: 1.25rem;
}

.section-heading p {
  max-width: 820px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.pill.ready {
  color: var(--cyan);
  border: 1px solid rgba(77, 220, 255, 0.3);
  background: rgba(25, 112, 136, 0.18);
}

.pill.protected {
  color: var(--yellow);
  border: 1px solid rgba(255, 200, 87, 0.27);
  background: rgba(120, 84, 20, 0.2);
}

.task-progress {
  margin: 28px 0;
}

.progress-track,
.capacity-track {
  height: 10px;
  border: 1px solid rgba(108, 174, 230, 0.13);
  border-radius: 999px;
  background: rgba(2, 12, 22, 0.85);
  overflow: hidden;
}

.progress-value,
.capacity-value {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
  box-shadow: 0 0 18px rgba(73, 180, 255, 0.45);
  transition: width 500ms ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.75rem;
}

.task-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.task-details > div {
  padding: 14px;
  border: 1px solid rgba(112, 175, 229, 0.12);
  border-radius: 12px;
  background: rgba(5, 20, 36, 0.62);
}

.task-details strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
}

.phase-one-note {
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 200, 87, 0.17);
  border-radius: 11px;
  color: #c8b88d;
  background: rgba(104, 72, 15, 0.12);
  font-size: 0.76rem;
  line-height: 1.5;
}

.section-block,
.panel,
.action-panel {
  padding: 24px;
}

.pipeline-section {
  margin-bottom: 18px;
}

.pipeline-legend {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.72rem;
}

.pipeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.online {
  background: var(--green);
}

.legend-dot.ready {
  background: var(--cyan);
}

.legend-dot.warning {
  background: var(--yellow);
}

.legend-dot.offline {
  background: var(--red);
}

.pipeline-wrap {
  position: relative;
  padding: 4px 0;
}

.pipeline-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.pipeline-row-two {
  display: grid;
  grid-template-columns:
    minmax(220px, 1fr)
    55px
    minmax(220px, 1fr)
    55px
    minmax(220px, 1fr);
  align-items: center;
}

.pipeline-row-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 22px;
}

.pipeline-node {
  position: relative;
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 17px;
  border: 1px solid rgba(112, 180, 239, 0.18);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(18, 49, 79, 0.88), rgba(7, 24, 43, 0.96));
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.pipeline-node:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.28),
    0 0 30px rgba(48, 143, 255, 0.07);
}

.pipeline-row-one .pipeline-node,
.publisher-node {
  width: min(480px, 100%);
}

.node-icon {
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  border: 1px solid rgba(77, 220, 255, 0.25);
  border-radius: 14px;
  color: var(--cyan);
  background:
    linear-gradient(145deg, rgba(38, 146, 188, 0.17), rgba(39, 92, 170, 0.16));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.node-body {
  min-width: 0;
}

.node-body span,
.node-body strong,
.node-body small {
  display: block;
}

.node-category {
  color: var(--faint);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.node-body strong {
  margin-top: 4px;
  font-size: 1rem;
}

.node-body small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.node-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.node-status.online {
  color: var(--green);
  border: 1px solid rgba(56, 229, 170, 0.28);
  background: rgba(28, 126, 94, 0.16);
}

.node-status.ready {
  color: var(--cyan);
  border: 1px solid rgba(77, 220, 255, 0.28);
  background: rgba(25, 113, 137, 0.16);
}

.node-status.warning,
.node-status.waiting {
  color: var(--yellow);
  border: 1px solid rgba(255, 200, 87, 0.27);
  background: rgba(118, 82, 19, 0.16);
}

.node-status.offline {
  color: var(--red);
  border: 1px solid rgba(255, 101, 122, 0.28);
  background: rgba(123, 33, 50, 0.16);
}

.vertical-connector {
  display: grid;
  place-items: center;
  height: 36px;
}

.vertical-connector span,
.branch-line,
.merge-line {
  width: 2px;
  height: 100%;
  background:
    linear-gradient(
      to bottom,
      rgba(77, 220, 255, 0.2),
      rgba(77, 220, 255, 0.75),
      rgba(77, 220, 255, 0.2)
    );
  box-shadow: 0 0 12px rgba(77, 220, 255, 0.3);
}

.horizontal-connector {
  display: grid;
  place-items: center;
}

.horizontal-connector span {
  width: 100%;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      rgba(77, 220, 255, 0.2),
      rgba(77, 220, 255, 0.8),
      rgba(77, 220, 255, 0.2)
    );
}

.pipeline-branch,
.pipeline-merge {
  position: relative;
  height: 50px;
}

.pipeline-branch span,
.pipeline-merge span {
  position: absolute;
  display: block;
}

.branch-line {
  top: 0;
  left: 50%;
  height: 25px;
}

.branch-center {
  top: 24px;
  left: 16.66%;
  width: 66.68%;
  height: 2px;
  background: rgba(77, 220, 255, 0.55);
}

.branch-left,
.branch-right {
  top: 24px;
  width: 2px;
  height: 26px;
  background: rgba(77, 220, 255, 0.55);
}

.branch-left {
  left: 16.66%;
}

.branch-right {
  right: 16.66%;
}

.pipeline-merge .merge-left,
.pipeline-merge .merge-right,
.pipeline-merge .merge-center {
  bottom: 24px;
  width: 2px;
  height: 26px;
  background: rgba(77, 220, 255, 0.55);
}

.merge-left {
  left: 16.66%;
}

.merge-center {
  left: 50%;
}

.merge-right {
  right: 16.66%;
}

.pipeline-merge::after {
  content: "";
  position: absolute;
  bottom: 24px;
  left: 16.66%;
  width: 66.68%;
  height: 2px;
  background: rgba(77, 220, 255, 0.55);
}

.merge-line {
  bottom: 0;
  left: 50%;
  height: 25px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(15, 44, 72, 0.9), rgba(6, 23, 41, 0.96));
  box-shadow: var(--shadow);
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(38, 141, 190, 0.14);
  font-size: 0.65rem;
  font-weight: 900;
}

.metric-card strong {
  display: block;
  margin-top: 5px;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.metric-card small {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.68rem;
}

.service-matrix,
.worker-list {
  display: grid;
  gap: 9px;
}

.service-row,
.worker-row {
  display: grid;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid rgba(108, 171, 226, 0.12);
  border-radius: 12px;
  background: rgba(6, 23, 41, 0.58);
}

.service-row {
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
}

.worker-row {
  grid-template-columns: 12px minmax(0, 1fr) auto auto auto;
}

.service-light,
.worker-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
}

.service-light.online,
.worker-light.online {
  background: var(--green);
  box-shadow: 0 0 12px rgba(56, 229, 170, 0.55);
}

.service-light.offline,
.worker-light.offline {
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 101, 122, 0.42);
}

.service-name,
.worker-name {
  min-width: 0;
}

.service-name strong,
.worker-name strong {
  display: block;
  font-size: 0.85rem;
}

.service-name small,
.worker-name small {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-latency,
.service-code,
.worker-stat {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.capacity-list {
  display: grid;
  gap: 25px;
}

.capacity-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.capacity-heading strong {
  color: var(--text);
}

.infrastructure-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.infrastructure-facts > div {
  padding: 13px;
  border: 1px solid rgba(108, 171, 226, 0.12);
  border-radius: 11px;
  background: rgba(5, 20, 36, 0.55);
}

.infrastructure-facts strong {
  display: block;
  margin-top: 7px;
  font-size: 0.8rem;
}

.activity-log {
  display: grid;
  gap: 9px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  padding: 12px;
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  background: rgba(7, 25, 44, 0.72);
}

.activity-item.success {
  border-left-color: var(--green);
}

.activity-item.warning {
  border-left-color: var(--yellow);
}

.activity-item.error {
  border-left-color: var(--red);
}

.activity-time {
  color: var(--faint);
  font-size: 0.67rem;
  white-space: nowrap;
}

.activity-message {
  color: #cad9e7;
  font-size: 0.76rem;
  line-height: 1.45;
}

.action-panel {
  margin-bottom: 18px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
}

.action-button {
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 90px;
  padding: 14px;
  border: 1px solid rgba(106, 170, 226, 0.12);
  border-radius: 13px;
  color: #70869a;
  background: rgba(6, 20, 36, 0.58);
  text-align: left;
}

.action-button.active {
  color: var(--text);
  border-color: rgba(77, 220, 255, 0.24);
  background:
    linear-gradient(145deg, rgba(16, 50, 81, 0.9), rgba(6, 24, 43, 0.94));
  cursor: pointer;
}

.action-button.active:hover {
  border-color: rgba(77, 220, 255, 0.5);
}

.action-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  background: rgba(55, 122, 179, 0.15);
  font-size: 0.62rem;
  font-weight: 900;
}

.action-button strong,
.action-button small {
  display: block;
}

.action-button strong {
  font-size: 0.82rem;
}

.action-button small {
  margin-top: 5px;
  color: var(--faint);
  font-size: 0.67rem;
}

.action-state {
  font-size: 0.64rem;
  font-weight: 850;
  text-transform: uppercase;
}

.muted-label {
  color: var(--faint);
  font-size: 0.7rem;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 130px;
  color: var(--faint);
  border: 1px dashed rgba(108, 171, 226, 0.15);
  border-radius: 12px;
  font-size: 0.8rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 4px 0;
  color: #5f7487;
  font-size: 0.67rem;
}

@media (max-width: 1220px) {
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pipeline-row-two {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .horizontal-connector {
    display: none;
  }

  .pipeline-branch,
  .pipeline-merge {
    display: none;
  }

  .pipeline-row-three {
    margin-top: 12px;
  }
}

@media (max-width: 960px) {
  .topbar,
  .hero-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar,
  .topbar-actions {
    flex-direction: column;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-health {
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .pipeline-row-three {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 1520px);
    padding-top: 9px;
  }

  .topbar,
  .hero-content,
  .command-card,
  .section-block,
  .panel,
  .action-panel {
    padding: 17px;
  }

  .topbar-brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .hero-health,
  .task-details,
  .metrics-grid,
  .infrastructure-facts,
  .action-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-node {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .node-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .service-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
  }

  .service-code {
    display: none;
  }

  .worker-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
  }

  .worker-stat:nth-last-child(-n + 2) {
    display: none;
  }

  .footer {
    flex-direction: column;
  }
}

/* ============================================================
   SmartDeck Phase 1.1 — Live Operations Summary
   ============================================================ */

.live-operation-card {
  position: relative;
  isolation: isolate;
}

.live-operation-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 85% 0%,
      rgba(76, 122, 255, 0.16),
      transparent 42%
    );
}

.operation-stage-banner {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 2px 0 20px;
  padding: 15px;
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 13px;
  background:
    linear-gradient(
      135deg,
      rgba(21, 67, 105, 0.56),
      rgba(7, 27, 48, 0.74)
    );
}

.operation-stage-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(77, 220, 255, 0.28);
  border-radius: 13px;
  color: var(--cyan);
  background:
    linear-gradient(
      145deg,
      rgba(43, 158, 209, 0.18),
      rgba(39, 91, 173, 0.18)
    );
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.operation-stage-copy span,
.operation-stage-copy strong,
.operation-stage-copy small {
  display: block;
}

.operation-stage-copy span {
  color: var(--faint);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.operation-stage-copy strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 1rem;
}

.operation-stage-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.operation-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.operation-summary-item {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(110, 175, 230, 0.12);
  border-radius: 11px;
  background: rgba(4, 20, 36, 0.58);
}

.operation-summary-item span,
.operation-summary-item strong,
.operation-summary-item small {
  display: block;
}

.operation-summary-item span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operation-summary-item strong {
  margin-top: 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-summary-item small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--faint);
  font-size: 0.64rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-now {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(56, 229, 170, 0.16);
  border-radius: 11px;
  background: rgba(24, 94, 75, 0.11);
}

.operation-now-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 0 4px rgba(56, 229, 170, 0.08),
    0 0 15px rgba(56, 229, 170, 0.48);
  animation: smartdeck-operation-pulse 2.1s infinite;
}

.operation-now strong,
.operation-now small {
  display: block;
}

.operation-now strong {
  font-size: 0.73rem;
}

.operation-now small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.64rem;
}

@keyframes smartdeck-operation-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.88);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@media (max-width: 640px) {
  .operation-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* SmartDeck Phase 2A — Operations API */

#localDiagnosticsButton:disabled {
  cursor: wait;
  opacity: 0.82;
}

#localDiagnosticsButton:disabled .action-icon {
  animation: diagnostics-operation-pulse 1.1s infinite;
}

#diagnosticsActionState {
  color: var(--cyan);
}

@keyframes diagnostics-operation-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

/* ============================================================
   SmartDeck Live Operations Console v1
============================================================ */

.operations-console-panel {
  min-width: 0;
  height: 100%;
}

.console-heading {
  align-items: flex-start;
  gap: 16px;
}

.console-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.console-job-state {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin-right: 4px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 750;
}

.console-live-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: rgba(126, 150, 171, 0.75);
  box-shadow: 0 0 8px rgba(126, 150, 171, 0.28);
}

.console-live-indicator.running {
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(49, 205, 255, 0.68);
  animation: smartdeck-console-pulse 1.15s infinite;
}

.console-live-indicator.passed {
  background: var(--green);
  box-shadow: 0 0 13px rgba(56, 229, 170, 0.58);
}

.console-live-indicator.failed {
  background: #ff6680;
  box-shadow: 0 0 13px rgba(255, 102, 128, 0.58);
}

.console-tool-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(97, 180, 244, 0.18);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(5, 28, 48, 0.65);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background 150ms ease;
}

.console-tool-button:hover {
  border-color: rgba(78, 211, 255, 0.46);
  color: var(--text);
  background: rgba(21, 69, 103, 0.72);
}

.operations-console-shell {
  overflow: hidden;
  margin-top: 13px;
  border: 1px solid rgba(79, 184, 241, 0.18);
  border-radius: 12px;
  background: #030a11;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 16px 42px rgba(0, 0, 0, 0.18);
}

.console-titlebar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(91, 169, 222, 0.12);
  color: rgba(160, 184, 202, 0.72);
  background:
    linear-gradient(
      180deg,
      rgba(16, 42, 62, 0.96),
      rgba(7, 24, 38, 0.96)
    );
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: 0.61rem;
}

.console-window-controls {
  display: flex;
  gap: 5px;
}

.console-window-controls span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(130, 160, 181, 0.36);
}

.console-window-controls span:nth-child(1) {
  background: rgba(255, 100, 120, 0.72);
}

.console-window-controls span:nth-child(2) {
  background: rgba(255, 197, 79, 0.72);
}

.console-window-controls span:nth-child(3) {
  background: rgba(55, 222, 164, 0.72);
}

#consoleJobIdentifier {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#consoleConnectionState {
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
}

.operations-console {
  box-sizing: border-box;
  width: 100%;
  height: 410px;
  min-height: 300px;
  overflow: auto;
  margin: 0;
  padding: 18px 20px 24px;
  border: 0;
  outline: 0;
  color: #8ef6bd;
  background:
    linear-gradient(
      rgba(4, 13, 21, 0.96),
      rgba(2, 8, 14, 0.99)
    );
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 0.69rem;
  line-height: 1.62;
  tab-size: 4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-color:
    rgba(67, 194, 239, 0.48)
    rgba(5, 20, 31, 0.72);
}

.operations-console::selection {
  color: #ffffff;
  background: rgba(50, 188, 239, 0.42);
}

.console-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 9px;
  color: var(--faint);
  font-size: 0.58rem;
}

#localDiagnosticsButton .action-state,
#diagnosticsActionState {
  color: var(--cyan);
}

#localDiagnosticsButton:disabled {
  cursor: wait;
  opacity: 0.82;
}

@keyframes smartdeck-console-pulse {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.13);
  }
}

@media (max-width: 900px) {
  .console-heading {
    display: block;
  }

  .console-toolbar {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .operations-console {
    height: 340px;
  }

  .console-footer {
    display: grid;
  }
}

@media (max-width: 560px) {
  .console-titlebar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #consoleConnectionState {
    display: none;
  }

  .operations-console {
    height: 300px;
    padding: 15px;
    font-size: 0.64rem;
  }
}

/* ============================================================
   SmartDeck Phase 2B Build Lessons
============================================================ */

#buildLessonsButton {
  cursor: pointer;
  border-color: rgba(49, 205, 255, 0.22);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    opacity 150ms ease;
}

#buildLessonsButton:hover {
  transform: translateY(-1px);
  border-color: rgba(49, 205, 255, 0.5);
  background: rgba(17, 62, 91, 0.76);
}

#buildLessonsButton:focus-visible {
  outline: 2px solid rgba(49, 205, 255, 0.68);
  outline-offset: 3px;
}

#buildLessonsButton[aria-busy="true"],
#buildLessonsButton:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

#buildLessonsButton[aria-busy="true"] .action-icon {
  animation: smartdeck-build-pulse 1.05s infinite;
}

#buildLessonsActionState {
  color: var(--cyan);
}

@keyframes smartdeck-build-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* ============================================================
   SMARTDECK WORKERS / CONSOLE WIDTH OVERRIDE
   Workers 45% — Console 55%
============================================================ */

/*
 * This targets the existing lower two-column layout only.
 * It does not hide, remove, relocate, or replace any panel.
 */

.workers-console-layout,
.pm2-console-grid,
.runtime-console-grid,
.workers-operations-grid {
  grid-template-columns:
    minmax(0, 9fr)
    minmax(0, 11fr) !important;
}

/*
 * Fallback for the current Mission Control lower section.
 * JavaScript will add this class to the existing shared parent.
 */

.mc-workers-console-resized {
  display: grid !important;
  grid-template-columns:
    minmax(0, 9fr)
    minmax(0, 11fr) !important;
  align-items: stretch !important;
  gap: 16px !important;
}

.mc-workers-console-resized > * {
  min-width: 0 !important;
}

/* Make the existing terminal larger without changing its container. */

.mc-workers-console-resized #operationsConsole {
  width: 100% !important;
  height: 560px !important;
  min-height: 520px !important;
  max-height: none !important;
}

/* Preserve the current workers panel and allow it to shrink cleanly. */

.mc-workers-console-resized .mc-workers-column {
  min-width: 0 !important;
}

/* Preserve the entire right-hand column, including console and activity. */

.mc-workers-console-resized .mc-console-column {
  min-width: 0 !important;
}

@media (max-width: 1180px) {
  .mc-workers-console-resized {
    grid-template-columns: 1fr !important;
  }

  .mc-workers-console-resized #operationsConsole {
    height: 460px !important;
    min-height: 420px !important;
  }
}

/* ============================================================
   ECOSYSTEM REGISTRY
   ============================================================ */

.ecosystem-section {
  margin-top: 28px;
}

.ecosystem-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ecosystem-search,
.ecosystem-filter {
  min-height: 42px;
  border: 1px solid rgba(114, 155, 205, 0.28);
  border-radius: 10px;
  background: rgba(8, 20, 37, 0.9);
  color: #eef7ff;
  padding: 0 12px;
}

.ecosystem-search {
  min-width: 270px;
}

.ecosystem-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.ecosystem-summary-card {
  border: 1px solid rgba(91, 155, 213, 0.22);
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(18, 40, 68, 0.94),
    rgba(10, 25, 44, 0.96)
  );
  padding: 16px;
}

.ecosystem-summary-card span {
  display: block;
  color: #8fa9c5;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ecosystem-summary-card strong {
  display: block;
  margin-top: 4px;
  color: #f2f8ff;
  font-size: 28px;
}

.ecosystem-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 16px;
}

.ecosystem-project-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 310px;
  border: 1px solid rgba(91, 155, 213, 0.22);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(17, 36, 61, 0.97),
    rgba(9, 23, 40, 0.98)
  );
  padding: 17px;
}

.ecosystem-project-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.ecosystem-project-name {
  margin: 0;
  color: #f4f8ff;
  font-size: 19px;
}

.ecosystem-project-category {
  display: block;
  margin-top: 2px;
  color: #86a3c1;
  font-size: 12px;
}

.ecosystem-status {
  align-self: flex-start;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ecosystem-status.online {
  background: rgba(40, 171, 129, 0.17);
  color: #77e4bc;
}

.ecosystem-status.warning {
  background: rgba(255, 177, 71, 0.17);
  color: #ffd080;
}

.ecosystem-status.development,
.ecosystem-status.planning {
  background: rgba(83, 139, 225, 0.18);
  color: #9dc4ff;
}

.ecosystem-purpose {
  color: #c2d1e2;
}

.ecosystem-health-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ecosystem-health-track {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(1, 8, 16, 0.75);
}

.ecosystem-health-value {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3d8bfd, #52d6a8);
}

.ecosystem-facts {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 5px 9px;
  font-size: 12px;
}

.ecosystem-facts span {
  color: #809bb8;
}

.ecosystem-facts strong {
  overflow: hidden;
  color: #dce9f7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecosystem-next,
.ecosystem-blocker {
  border-left: 3px solid #4f9dff;
  border-radius: 5px;
  background: rgba(16, 39, 66, 0.75);
  padding: 8px 10px;
  color: #cbd9e8;
  font-size: 12px;
}

.ecosystem-blocker {
  border-left-color: #ffb547;
}

.ecosystem-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.ecosystem-card-actions a {
  flex: 1;
  border: 1px solid rgba(91, 155, 213, 0.3);
  border-radius: 9px;
  background: rgba(26, 73, 126, 0.65);
  padding: 9px;
  color: #eef7ff;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 1200px) {
  .ecosystem-project-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 760px) {
  .ecosystem-summary-grid,
  .ecosystem-project-grid {
    grid-template-columns: 1fr;
  }

  .ecosystem-search {
    min-width: 100%;
  }

  .ecosystem-toolbar {
    justify-content: stretch;
  }
}

.registry-url-pending {
  display: block;
  flex: 1;
  border: 1px solid rgba(91, 155, 213, 0.18);
  border-radius: 9px;
  background: rgba(8, 21, 37, 0.72);
  padding: 9px;
  color: #7893ad;
  text-align: center;
}
