/* EMC structural layout — safe inside the MARSS slide panel */
.module-emc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.module-emc .emc-panel {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--emc-border);
  border-radius: var(--emc-radius-panel);
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--emc-accent), 0.18), transparent 42%),
    linear-gradient(180deg, #111d2b 0%, var(--emc-bg) 100%);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.module-emc .emc-header {
  display: grid;
  gap: 4px;
  padding: 4px 4px 10px;
}

.module-emc .emc-header h2 {
  margin-bottom: 0;
  font-size: 0.94rem;
  line-height: 1.2;
  font-weight: 850;
}

.module-emc .emc-subtitle {
  margin-bottom: 0;
  color: var(--emc-text-muted);
  font-size: 0.68rem;
}

.module-emc .emc-controls-container,
.module-emc .emc-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.module-emc .emc-section {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--emc-border-soft);
  border-radius: var(--emc-radius-card);
  background: rgba(7, 15, 24, 0.72);
}

.module-emc .emc-section h3 {
  margin-bottom: 8px;
  color: rgb(var(--emc-accent-bright));
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.module-emc .emc-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.module-emc .emc-section-block {
  min-width: 0;
  border: 1px solid var(--emc-border-soft);
  border-radius: 11px;
  background: rgba(17, 31, 47, 0.72);
  overflow: hidden;
}

.module-emc .emc-card-header {
  padding: 8px 9px;
  border-bottom: 1px solid var(--emc-border-soft);
  background: rgba(var(--emc-accent), 0.075);
}

.module-emc .emc-card-header h4 {
  margin: 0;
  color: rgb(var(--emc-accent-bright));
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.module-emc .emc-card-body {
  min-width: 0;
  padding: 8px 9px;
}

.module-emc .emc-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.8fr) minmax(0, 1.2fr);
  gap: 7px;
  align-items: start;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.module-emc .emc-row:last-child {
  border-bottom: 0;
}

/* =========================================================
   EMC EXECUTION CONSOLE
========================================================= */

.module-emc .emc-reports-column {
  display: block;
  min-width: 0;
  margin-bottom: 10px;
}

.module-emc .emc-execution-console {
  min-width: 0;
  overflow: hidden;

  border: 1px solid rgba(var(--emc-accent), 0.3);
  border-radius: var(--emc-radius-card);

  background:
    radial-gradient(
      circle at 8% 0%,
      rgba(var(--emc-accent), 0.12),
      transparent 55%
    ),
    rgba(5, 13, 22, 0.96);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.module-emc .emc-execution-console[hidden] {
  display: none !important;
}

.module-emc .emc-execution-console__summary {
  display: grid;

  grid-template-columns:
    auto
    auto
    minmax(0, 1fr)
    auto;

  gap: 9px;
  align-items: center;

  min-height: 42px;
  padding: 8px 10px;

  cursor: pointer;
  list-style: none;
}

.module-emc .emc-execution-console__summary::-webkit-details-marker {
  display: none;
}

.module-emc .emc-execution-console__indicator {
  width: 10px;
  height: 10px;

  border-radius: 999px;

  background: rgb(var(--emc-accent-bright));

  box-shadow:
    0 0 12px rgba(var(--emc-accent), 0.72);
}

.module-emc .emc-execution-console__title {
  color: rgba(241, 255, 250, 0.96);

  font-size: 0.68rem;
  font-weight: 850;
}

.module-emc .emc-execution-console__status {
  min-width: 0;
  overflow: hidden;

  color: var(--emc-text-muted);

  font-size: 0.62rem;
  font-weight: 700;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-emc .emc-execution-console__action {
  padding: 4px 8px;

  border: 1px solid rgba(var(--emc-accent), 0.24);
  border-radius: 8px;

  color: var(--emc-text-soft);

  font-size: 0.57rem;
  font-weight: 850;
}

.module-emc
.emc-execution-console[open]
.emc-execution-console__action::before {
  content: "Hide";
}

.module-emc
.emc-execution-console[open]
.emc-execution-console__action {
  font-size: 0;
}

.module-emc
.emc-execution-console[open]
.emc-execution-console__action::before {
  font-size: 0.57rem;
}

.module-emc .emc-report-panel {
  border-top:
    1px solid rgba(var(--emc-accent), 0.16);

  background:
    rgba(0, 0, 0, 0.18);
}

.module-emc .emc-report-panel pre {
  max-height: 230px;
  margin: 0;
  padding: 10px 12px;

  overflow: auto;

  color: var(--emc-text-soft);

  font-family:
    "IBM Plex Mono",
    "JetBrains Mono",
    monospace;

  font-size: 0.64rem;
  line-height: 1.55;

  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Subtle activity heartbeat for the EMC execution report */
.module-emc .emc-execution-console__indicator {
  animation: emc-report-heartbeat 2.8s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, opacity, box-shadow;
}

@keyframes emc-report-heartbeat {
  0%,
  18%,
  100% {
    transform: scale(1);
    opacity: 0.72;
    box-shadow: 0 0 0 0 rgba(117, 201, 255, 0);
  }

  5% {
    transform: scale(1.12);
    opacity: 0.95;
    box-shadow: 0 0 0 3px rgba(117, 201, 255, 0.08);
  }

  9% {
    transform: scale(1);
    opacity: 0.78;
    box-shadow: 0 0 0 1px rgba(117, 201, 255, 0.04);
  }

  13% {
    transform: scale(1.07);
    opacity: 0.88;
    box-shadow: 0 0 0 2px rgba(117, 201, 255, 0.06);
  }
}

/* Avoid animation when the report is expanded for reading */
.module-emc .emc-execution-console[open]
  .emc-execution-console__indicator {
  animation-play-state: paused;
  transform: scale(1);
  opacity: 0.85;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .module-emc .emc-execution-console__indicator {
    animation: none;
  }
}

/* =========================================================
   EMC versioning and release notes
========================================================= */

.emc-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.emc-version {
  color: rgba(255, 255, 255, 0.58);
  font-family: Roboto, Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
}