:root {
  --bg: #0d1012;
  --bar: #070a0c;
  --rail: #11171a;
  --panel: #171d21;
  --panel-2: #20282d;
  --panel-3: #0f1417;
  --line: #34424b;
  --line-strong: #52636d;
  --text: #eef3f5;
  --muted: #9aa8b0;
  --good: #67d391;
  --bad: #ff6f73;
  --warn: #e7c765;
  --accent: #73c7ff;
  --accent-2: #9be28f;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 8px 12px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: grid;
  gap: 4px;
}

.brand strong {
  font-size: 15px;
}

.brand span,
p,
.muted {
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.tab,
button,
select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}

button {
  min-height: 30px;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
}

button:hover,
.tab.active,
.segment.active {
  border-color: var(--accent);
  color: var(--accent);
}

.primary,
.import-tab {
  border-color: var(--accent-2);
  background: #16251d;
  color: var(--accent-2);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 7px 8px;
}

textarea {
  resize: vertical;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

h1 {
  font-size: 21px;
}

h2 {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
}

.status-rail {
  position: fixed;
  top: 58px;
  bottom: 0;
  left: 0;
  width: 260px;
  overflow: auto;
  padding: 12px;
  background: var(--rail);
  border-right: 1px solid var(--line);
}

.status-rail dl {
  display: grid;
  gap: 7px;
}

.status-rail .rail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 7px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.status-rail dt {
  color: var(--muted);
}

.status-rail dd {
  max-width: 120px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  margin-top: 58px;
  margin-left: 260px;
  padding: 12px;
}

.page {
  display: none;
}

.page.active {
  display: grid;
  gap: 10px;
}

.page-head,
.section-head,
.button-row,
.preset-row,
.segmented {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.page-head {
  min-height: 54px;
}

.button-row,
.preset-row,
.segmented {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.panel {
  min-width: 0;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.metric-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  min-height: 70px;
  padding: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.detail-item {
  min-height: 54px;
  padding: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.detail-item strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric .label {
  color: var(--muted);
  font-size: 11px;
}

.metric .value {
  margin-top: 8px;
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.two-col,
.wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.form-grid,
.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.filter-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 10px;
}

label {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.actions-panel,
.timeline-panel {
  grid-column: span 1;
}

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

.action-grid button.busy,
button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.82;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(115, 199, 255, 0.22);
}

.action-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #13212b;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-left-color: var(--accent);
  border-radius: 5px;
}

.action-banner strong,
.action-banner span,
.action-banner small {
  display: block;
  min-width: 0;
}

.action-banner span {
  color: var(--text);
}

.action-banner small {
  color: var(--muted);
  text-align: right;
}

.action-banner.running {
  border-left-color: var(--accent);
}

.action-banner.pass {
  border-left-color: var(--good);
}

.action-banner.fail {
  border-left-color: var(--bad);
}

.action-feed {
  display: grid;
  gap: 6px;
}

.action-feed-empty {
  padding: 8px 10px;
  color: var(--muted);
  background: var(--panel-3);
  border: 1px dashed var(--line);
  border-radius: 4px;
}

.action-feed-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 180px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 4px;
}

.action-feed-item.running {
  border-left-color: var(--accent);
}

.action-feed-item.pass {
  border-left-color: var(--good);
}

.action-feed-item.fail {
  border-left-color: var(--bad);
}

.action-feed-meta {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.action-feed-title {
  color: var(--text);
  font-weight: 700;
}

.action-feed-summary,
.action-feed-time {
  color: var(--muted);
  min-width: 0;
}

.notice {
  margin-top: 10px;
  padding: 8px;
  color: var(--warn);
  background: #221f13;
  border: 1px solid #655628;
  border-radius: 4px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.stage {
  min-height: 78px;
  padding: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.stage.running {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(115, 199, 255, 0.35), 0 0 18px rgba(115, 199, 255, 0.18);
  animation: pulseStage 1.2s ease-in-out infinite;
}

.stage.pass {
  border-color: rgba(103, 211, 145, 0.65);
}

.stage.fail {
  border-color: rgba(255, 111, 115, 0.75);
}

.stage.warn,
.stage.pass_with_warning {
  border-color: rgba(231, 199, 101, 0.75);
}

@keyframes pulseStage {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

.stage strong,
.stage span,
.stage small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage small {
  margin-top: 4px;
  color: var(--muted);
}

.pending { color: var(--muted); }
.running { color: var(--warn); }
.warn,
.pass_with_warning { color: var(--warn); }
.pass { color: var(--good); }
.fail { color: var(--bad); }

.progress-hero {
  display: grid;
  gap: 10px;
}

.progress-bar-shell {
  position: relative;
  height: 30px;
  overflow: hidden;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.progress-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
  background: var(--accent);
}

.progress-bar-fill.running {
  background: repeating-linear-gradient(45deg, #2d9fe8 0, #2d9fe8 12px, #73c7ff 12px, #73c7ff 24px);
  animation: progressMove 1s linear infinite;
}

.progress-bar-fill.completed {
  background: var(--good);
}

.progress-bar-fill.failed {
  background: var(--bad);
}

@keyframes progressMove {
  from { background-position: 0 0; }
  to { background-position: 34px 0; }
}

#wizardProgressLabel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.activity-banner {
  padding: 9px;
  background: #111f27;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
}

.status-strip,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.status-pill,
.chip {
  padding: 6px 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.console-panel pre,
#wizardConsole {
  min-height: 260px;
  max-height: 340px;
  color: #d9ffe3;
  background: #050806;
  border-color: #24442d;
}

.console-debug {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.console-line {
  display: block;
  white-space: pre-wrap;
}

.console-line.info {
  color: #d9ffe3;
}

.console-line.success {
  color: #66e899;
}

.console-line.warn {
  color: #f1c75b;
}

.console-line.error {
  color: #ff7c7c;
}

.table-wrap {
  overflow: auto;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.table-wrap.tall {
  max-height: calc(100vh - 190px);
}

.table-wrap.medium {
  max-height: 310px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

td.wrap {
  max-width: 420px;
  white-space: normal;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #11171b;
  color: var(--accent);
}

pre {
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.invoke-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}

.invoke-panel.open {
  display: grid;
}

.invoke-card {
  display: grid;
  width: min(760px, 96vw);
  max-height: 92vh;
  gap: 10px;
  overflow: auto;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.wizard-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  padding: 18px;
  background: rgba(0, 0, 0, 0.7);
}

.wizard-modal.open {
  display: block;
}

.wizard-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1480px, 98vw);
  height: min(940px, 96vh);
  margin: 0 auto;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}

.wizard-steps {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  background: var(--rail);
  border-bottom: 1px solid var(--line);
}

.wizard-step.active {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.wizard-body {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.wizard-page {
  display: none;
  gap: 10px;
}

.wizard-page.active {
  display: grid;
}

#wizardManifestPreview,
#wizardRunOutput,
#wizardInvokeOutput {
  min-height: 180px;
}

#wizardToolSelect {
  margin-bottom: 8px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    position: static;
  }

  .status-rail {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    margin: 0;
  }

  .metric-grid,
  .metric-grid.compact,
  .two-col,
  .three-col,
  .wizard-grid,
  .form-grid,
  .filter-grid,
  .action-grid,
  .timeline {
    grid-template-columns: 1fr;
  }
}

/* Phase 27B — capability-centric polish */
.primary-tab {
  border-color: rgba(115, 199, 255, 0.55);
  background: linear-gradient(180deg, rgba(115, 199, 255, 0.18), rgba(115, 199, 255, 0.06));
}

.raw-tab {
  opacity: 0.86;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(115, 199, 255, 0.22), transparent 32%),
    radial-gradient(circle at 92% 20%, rgba(155, 226, 143, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(23, 29, 33, 0.98), rgba(13, 16, 18, 0.98));
  border: 1px solid rgba(115, 199, 255, 0.38);
  border-radius: 12px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

.hero-copy h1 {
  margin: 6px 0 8px;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-badges,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.hero-actions {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.large-cta {
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 10px;
}

.catalog-panel-main,
.catalog-side-panel,
.catalog-selected-panel {
  border-color: rgba(115, 199, 255, 0.22);
}

.catalog-side-panel {
  align-self: start;
  position: sticky;
  top: 70px;
}

.latest-job-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.latest-job-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-progress {
  height: 8px;
  overflow: hidden;
  background: #070a0c;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.mini-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.job-kv {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 5px 8px;
}

.job-kv dt {
  color: var(--muted);
}

.job-kv dd {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.cap-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.cap-detail-head h3 {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: 20px;
}

.capability-guidance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.capability-guidance-grid section {
  min-width: 0;
  padding: 10px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.capability-guidance-grid h4 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

.capability-guidance-grid pre {
  min-height: 0;
  margin: 0;
  white-space: pre-wrap;
}

.floating-import {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  min-height: 46px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #061014;
  font-weight: 800;
  box-shadow: 0 14px 40px rgba(115, 199, 255, 0.28);
}

.floating-import:hover {
  color: #061014;
  transform: translateY(-1px);
}

.import-latest-panel {
  border-color: rgba(155, 226, 143, 0.28);
}

hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 10px 0;
}

@media (max-width: 1180px) {
  .hero-panel,
  .catalog-layout,
  .capability-guidance-grid {
    grid-template-columns: 1fr;
  }

  .catalog-side-panel {
    position: static;
  }
}

/* Phase 27C — Capability-centric premium polish and autopilot import UX */
:root {
  --bg: #07111f;
  --bar: rgba(5, 12, 22, 0.92);
  --rail: rgba(8, 18, 32, 0.96);
  --panel: rgba(17, 31, 48, 0.88);
  --panel-2: rgba(24, 42, 62, 0.92);
  --panel-3: rgba(7, 18, 30, 0.9);
  --line: rgba(126, 163, 190, 0.22);
  --line-strong: rgba(151, 202, 234, 0.42);
  --text: #f5fbff;
  --muted: #a8bac8;
  --good: #7cf2a5;
  --bad: #ff7d86;
  --warn: #ffd36f;
  --accent: #7ed7ff;
  --accent-2: #9cf5c6;
  --gold: #f1d18a;
  --glow: rgba(126, 215, 255, 0.22);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(71, 146, 200, 0.20), transparent 34%),
    radial-gradient(circle at 76% 10%, rgba(156, 245, 198, 0.13), transparent 28%),
    linear-gradient(180deg, #07111f 0%, #0b1320 50%, #070d17 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

pre,
code,
table,
input,
select,
textarea {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.topbar {
  min-height: 68px;
  padding: 10px 16px;
  background: var(--bar);
  border-bottom: 1px solid rgba(126, 215, 255, 0.18);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0,0,0,.28);
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--accent-2);
  font-size: 11px;
}

.tab,
button {
  border-radius: 999px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.tab.primary-tab,
.tab.import-tab,
.primary {
  box-shadow: 0 0 0 1px rgba(156,245,198,.08), 0 10px 26px rgba(0,0,0,.18);
}

button:hover,
.tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

.status-rail {
  top: 68px;
  background: linear-gradient(180deg, rgba(8, 18, 32, 0.98), rgba(6, 14, 25, 0.96));
  border-right: 1px solid rgba(126, 215, 255, 0.18);
}

.workspace {
  margin-top: 68px;
  padding: 16px;
}

.panel,
.metric,
.detail-item,
.latest-job-card {
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 14px;
  background: linear-gradient(180deg, rgba(21, 38, 57, 0.92), rgba(12, 25, 40, 0.88));
  border: 1px solid rgba(126, 215, 255, 0.18);
}

.metric {
  background: linear-gradient(180deg, rgba(30, 53, 76, .88), rgba(15, 31, 48, .88));
  border-color: rgba(126, 215, 255, 0.16);
}

.metric .label,
.detail-item span,
.job-kv dt {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}

.metric .value,
.detail-item strong {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 750;
}

.super-server-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(156, 245, 198, .22);
  background:
    linear-gradient(135deg, rgba(15, 42, 64, .94), rgba(9, 23, 37, .94)),
    radial-gradient(circle at right top, rgba(156, 245, 198, .18), transparent 42%);
}

.super-server-hero::after {
  content: "";
  position: absolute;
  inset: -35% -10% auto auto;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(126, 215, 255, .18), transparent 58%);
  pointer-events: none;
}

.hero-copy h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 760px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.autopilot-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(241, 209, 138, 0.25);
  background:
    linear-gradient(135deg, rgba(31, 49, 68, 0.96), rgba(10, 23, 37, 0.94)),
    radial-gradient(circle at 10% 0%, rgba(241, 209, 138, 0.12), transparent 38%);
}

.autopilot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.autopilot-head h2 {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
}

.autopilot-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px auto;
  gap: 10px;
  align-items: end;
}

.autopilot-input input {
  min-height: 42px;
  border-color: rgba(241, 209, 138, 0.32);
  background: rgba(5, 12, 22, 0.58);
  font-size: 13px;
}

.autopilot-actions .primary,
.autopilot-actions button {
  min-height: 42px;
}

.autopilot-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(241, 209, 138, 0.42);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(241, 209, 138, 0.08);
  white-space: nowrap;
}

.autopilot-status {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(126, 215, 255, 0.16);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(5, 12, 22, 0.42);
}

.autopilot-status strong { color: var(--text); }
.autopilot-status code { color: var(--accent-2); white-space: pre-wrap; }
.autopilot-status.pass { border-color: rgba(124, 242, 165, 0.32); }
.autopilot-status.warn { border-color: rgba(255, 211, 111, 0.38); color: #ffe4a3; }
.autopilot-status.fail { border-color: rgba(255, 125, 134, 0.42); color: #ffb4ba; }
.autopilot-status.running { border-color: rgba(126, 215, 255, 0.42); }

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.workflow-strip.compact-flow {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workflow-strip > div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(126, 215, 255, 0.16);
  border-radius: 14px;
  background: rgba(5, 12, 22, 0.38);
}

.workflow-strip strong {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  color: #061014;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}

.workflow-strip span {
  color: var(--text);
  font-weight: 760;
}

.workflow-strip small {
  color: var(--muted);
  line-height: 1.35;
}

.registration-contract {
  margin-bottom: 12px;
  border-color: rgba(156, 245, 198, .18);
}

.wizard-autopilot-panel {
  margin-bottom: 12px;
}

.floating-import {
  right: 24px;
  bottom: 24px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7ed7ff 0%, #9cf5c6 55%, #f1d18a 100%);
  box-shadow: 0 18px 52px rgba(126, 215, 255, 0.32);
}

.floating-import::before {
  content: "Autopilot Ready";
  position: absolute;
  right: 12px;
  bottom: 58px;
  padding: 6px 10px;
  color: var(--gold);
  background: rgba(5, 12, 22, .86);
  border: 1px solid rgba(241, 209, 138, .25);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.console-panel pre,
#wizardConsole {
  min-height: 220px;
  border-color: rgba(156, 245, 198, 0.18);
  background: #02070d;
  box-shadow: inset 0 0 0 1px rgba(156,245,198,.05);
}

.stage.running {
  border-color: rgba(126, 215, 255, 0.58);
  box-shadow: 0 0 0 1px rgba(126, 215, 255, 0.14), 0 0 26px rgba(126, 215, 255, .16);
}

.stage.pass {
  border-color: rgba(124, 242, 165, 0.36);
}

.stage.fail {
  border-color: rgba(255, 125, 134, 0.45);
}

@media (max-width: 1260px) {
  .autopilot-grid,
  .workflow-strip,
  .workflow-strip.compact-flow {
    grid-template-columns: 1fr;
  }

  .autopilot-head {
    display: grid;
  }
}

/* Phase 27D — Capability-centric luxury polish */
:root {
  --phase27d-bg-deep: #050814;
  --phase27d-bg-mid: #081527;
  --phase27d-glass: rgba(12, 26, 45, 0.78);
  --phase27d-glass-strong: rgba(15, 35, 60, 0.92);
  --phase27d-line: rgba(136, 192, 255, 0.18);
  --phase27d-cyan: #7dd3fc;
  --phase27d-blue: #60a5fa;
  --phase27d-gold: #f6c96b;
  --phase27d-green: #52f3a8;
  --phase27d-text: #eef7ff;
  --phase27d-muted: #9fb7ce;
}

body {
  background:
    radial-gradient(circle at 18% 0%, rgba(96, 165, 250, 0.18), transparent 32rem),
    radial-gradient(circle at 92% 8%, rgba(125, 211, 252, 0.14), transparent 36rem),
    linear-gradient(135deg, var(--phase27d-bg-deep), var(--phase27d-bg-mid) 48%, #06111f);
  color: var(--phase27d-text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 78%);
  z-index: 0;
}

.topbar,
.status-rail,
.workspace,
.floating-import {
  position: relative;
  z-index: 1;
}

.topbar {
  background: rgba(5, 10, 20, 0.86);
  border-bottom: 1px solid var(--phase27d-line);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 48px rgba(0,0,0,0.28);
}

.brand strong {
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

#modeBadge {
  border: 1px solid rgba(125, 211, 252, 0.25);
  background: rgba(96, 165, 250, 0.08);
  color: var(--phase27d-cyan);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
}

.tab {
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.035);
  transition: transform 160ms ease, border 160ms ease, background 160ms ease;
}
.tab:hover { transform: translateY(-1px); border-color: rgba(125, 211, 252, 0.32); }
.tab.active,
.tab.primary-tab.active {
  background: linear-gradient(135deg, rgba(96,165,250,0.25), rgba(125,211,252,0.14));
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 0 0 1px rgba(125,211,252,0.08), 0 12px 34px rgba(0,0,0,0.24);
}
.import-tab {
  background: linear-gradient(135deg, rgba(246, 201, 107, 0.16), rgba(96,165,250,0.08));
  border-color: rgba(246, 201, 107, 0.28);
}
.raw-tab:not(.active) { opacity: 0.72; }

.panel,
.hero-panel,
.status-rail,
.modal-card {
  background: var(--phase27d-glass);
  border: 1px solid var(--phase27d-line);
  box-shadow: 0 22px 60px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
}

.super-server-hero {
  background:
    linear-gradient(135deg, rgba(10, 27, 48, 0.94), rgba(8, 17, 31, 0.86)),
    radial-gradient(circle at top right, rgba(246,201,107,0.2), transparent 22rem),
    radial-gradient(circle at bottom left, rgba(125,211,252,0.2), transparent 22rem);
  border-color: rgba(125, 211, 252, 0.32);
}
.super-server-hero h1 {
  font-size: clamp(2.25rem, 4vw, 4.5rem);
  letter-spacing: -0.06em;
}
.super-server-hero p { max-width: 760px; color: #c5d8eb; }

.large-cta,
.primary,
button.primary,
.floating-import {
  background: linear-gradient(135deg, #63d7ff, #6aa7ff 55%, #f6c96b);
  color: #06111f;
  border: 0;
  box-shadow: 0 16px 38px rgba(96, 165, 250, 0.22);
  font-weight: 800;
}
button.primary:hover,
.large-cta:hover,
.floating-import:hover { filter: brightness(1.07); transform: translateY(-1px); }

.capability-command-deck,
.model-routing-matrix,
.meta-contract-panel,
.autopilot-panel {
  border-color: rgba(125, 211, 252, 0.26);
}

.command-deck-grid,
.routing-matrix-grid,
.meta-contract-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.command-card,
.routing-matrix-grid > div,
.meta-contract-grid > div {
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.022));
  padding: 1rem;
  min-height: 118px;
}
.command-card span,
.routing-matrix-grid b {
  color: var(--phase27d-cyan);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.55rem;
}
.command-card strong,
.meta-contract-grid strong { display: block; font-size: 1rem; margin-bottom: 0.45rem; }
.command-card p,
.meta-contract-grid span,
.routing-matrix-grid span { color: var(--phase27d-muted); line-height: 1.45; }
.command-card code,
.routing-matrix-grid code {
  margin-top: 0.75rem;
  display: inline-block;
  color: var(--phase27d-gold);
}
.gold-card {
  border-color: rgba(246,201,107,0.35);
  background: linear-gradient(180deg, rgba(246,201,107,0.12), rgba(255,255,255,0.025));
}
.active-card { box-shadow: 0 0 0 1px rgba(125,211,252,0.12), inset 0 0 28px rgba(125,211,252,0.06); }

.registration-contract,
.autopilot-runbook {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgba(246, 201, 107, 0.24);
  background: rgba(246, 201, 107, 0.07);
  border-radius: 16px;
  padding: 1rem;
}
.registration-contract strong,
.autopilot-runbook strong { color: var(--phase27d-gold); }
.registration-contract span,
.autopilot-runbook span { color: #cfdbeb; }

.capability-detail-pro {
  background: linear-gradient(180deg, rgba(6, 16, 31, 0.72), rgba(7, 18, 33, 0.5));
  border-radius: 18px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  padding: 1rem;
}
.cap-detail-head h3 { color: var(--phase27d-cyan); }
.capability-guidance-grid section {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 1rem;
}

.latest-job-card,
.autopilot-status {
  border: 1px solid rgba(125,211,252,0.16);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.table-wrap table th {
  background: rgba(125, 211, 252, 0.08);
  color: #dff4ff;
}
.table-wrap table tr:hover td { background: rgba(125, 211, 252, 0.045); }

.floating-import {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  padding: 0.95rem 1.15rem;
  border-radius: 999px;
}

.wizard-progress-header,
.terminal,
#jobConsole,
#consoleOutput {
  background: #030712;
  color: #d7f7ff;
  border: 1px solid rgba(125,211,252,0.18);
}

@media (max-width: 1100px) {
  .command-deck-grid,
  .routing-matrix-grid,
  .meta-contract-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .command-deck-grid,
  .routing-matrix-grid,
  .meta-contract-grid { grid-template-columns: 1fr; }
  .floating-import { left: 1rem; right: 1rem; text-align: center; }
}

/* Phase 27E local-source/tool-readiness clarity */
.progress-bar-fill.warning {
  background: linear-gradient(90deg, rgba(255,211,111,0.95), rgba(255,164,71,0.95));
}
.repo-role-note {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(255,211,111,0.28);
  border-radius: 14px;
  background: rgba(255,211,111,0.08);
  color: #ffe7a6;
}
.capability-contract-banner {
  border: 1px solid rgba(124, 242, 165, 0.28);
  background: linear-gradient(135deg, rgba(124, 242, 165, 0.10), rgba(124, 199, 255, 0.06));
}


/* ===== Phase 27F Responsive shell polish ===== */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
.topbar {
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.topbar-center { min-width: 0; }
.topbar-controls { display: flex; align-items: center; gap: 8px; }
.chrome-toggle {
  display: none;
  min-width: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
}
.brand { min-width: 0; }
.brand strong { display: block; }
#modeBadge {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tabs {
  min-width: 0;
  padding-bottom: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; width: 0; height: 0; }
.tab { flex: 0 0 auto; }
.status-rail { width: 240px; }
.workspace {
  margin-left: 240px;
  padding: 16px;
  min-width: 0;
}
.page.active {
  align-content: start;
  align-items: start;
}
.hero-panel {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: stretch;
}
.hero-copy { display: grid; gap: 0.65rem; }
.hero-actions { align-content: start; }
.catalog-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); }
.catalog-side-panel { top: 88px; }
.metric-grid, .metric-grid.compact, .detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.table-wrap { max-width: 100%; overflow: auto; }
.table-wrap table { min-width: 640px; }
.button-row.tight { flex-wrap: wrap; }
.floating-import { display: none; }
.shell-backdrop {
  position: fixed;
  inset: 0;
  z-index: 18;
  background: rgba(4, 8, 15, 0.48);
  backdrop-filter: blur(2px);
}
body[data-active-tab="catalog"] .workspace { scroll-margin-top: 90px; }

@media (max-width: 1360px) {
  .status-rail { width: 228px; }
  .workspace { margin-left: 228px; padding: 14px; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 1180px) {
  .chrome-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 
      "brand controls"
      "tabs tabs";
    align-items: center;
    padding: 10px 12px;
  }
  .topbar-brand { grid-area: brand; }
  .topbar-controls { grid-area: controls; justify-content: flex-end; }
  .topbar-center {
    grid-area: tabs;
    display: none;
    width: 100%;
    padding-top: 4px;
  }
  body.nav-open .topbar-center { display: block; }
  .tabs {
    padding-bottom: 0;
    overflow: auto;
    background: rgba(6, 12, 21, 0.88);
    border: 1px solid rgba(125,211,252,0.16);
    border-radius: 18px;
    padding: 8px;
  }
  .status-rail {
    position: fixed;
    top: 86px;
    left: 12px;
    bottom: 12px;
    width: min(320px, calc(100vw - 24px));
    transform: translateX(calc(-100% - 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform 160ms ease, opacity 160ms ease;
    z-index: 22;
  }
  body.rail-open .status-rail {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  .workspace {
    margin-left: 0;
    margin-top: 86px;
    padding: 12px;
  }
  .hero-panel,
  .catalog-layout,
  .autopilot-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
  .hero-actions, .autopilot-actions {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .action-banner {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .action-banner small {
    text-align: left;
  }
  .action-feed-item {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
  }
  .action-feed-summary,
  .action-feed-time {
    grid-column: 2 / -1;
  }
  .catalog-side-panel { position: static; }
  .section-head, .autopilot-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .floating-import {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    left: auto;
    right: 1rem;
    bottom: 1rem;
    min-width: auto;
  }
}

@media (max-width: 760px) {
  #modeBadge { display: none; }
  .topbar { padding: 10px; gap: 10px; }
  .workspace { margin-top: 84px; padding: 10px; }
  .panel, .hero-panel, .status-rail { padding: 12px; }
  .super-server-hero h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .button-row, .button-row.tight { width: 100%; }
  .button-row > button, .hero-actions button, .autopilot-actions button { width: 100%; }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-feed-item { grid-template-columns: 1fr; }
  .action-feed-summary,
  .action-feed-time {
    grid-column: 1;
  }
  .latest-job-top { flex-direction: column; align-items: flex-start; }
  .table-wrap table { min-width: 560px; }
  .floating-import { left: 1rem; right: 1rem; }
}


/* ===== Phase 27G: layout, responsive, and autopilot-result fixes ===== */
:root {
  --shell-topbar-height: 84px;
  --shell-rail-width: 240px;
}

html, body { overflow-x: hidden; }
body { overflow-x: hidden; }
.topbar {
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto !important;
  align-items: start;
  min-height: auto;
}
.topbar-center { min-width: 0; overflow: hidden; }
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible !important;
  scrollbar-width: none;
}
.topbar-center::-webkit-scrollbar,
.tabs::-webkit-scrollbar { display: none !important; width: 0; height: 0; }
.tab { max-width: 100%; }
.status-rail {
  top: var(--shell-topbar-height) !important;
  width: var(--shell-rail-width) !important;
  max-height: calc(100vh - var(--shell-topbar-height) - 10px);
  overflow: auto;
}
.workspace {
  margin-top: var(--shell-topbar-height) !important;
  margin-left: var(--shell-rail-width) !important;
  padding: 14px !important;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.page.active,
#catalog.page.active,
.capability-catalog-page {
  align-content: start !important;
  align-items: start !important;
  justify-content: stretch;
  grid-auto-rows: max-content;
  gap: 14px;
}
.capability-catalog-page > * { margin-top: 0 !important; }
.super-server-hero,
.hero-panel {
  min-height: 0 !important;
  padding: 20px !important;
  align-items: center !important;
}
.hero-copy,
.hero-actions {
  align-content: start;
}
.catalog-layout { align-items: start; }
.catalog-side-panel {
  position: sticky;
  top: calc(var(--shell-topbar-height) + 8px);
  max-height: calc(100vh - var(--shell-topbar-height) - 24px);
  overflow: auto;
}
.latest-job-card { min-height: 0; }
.wizard-modal { padding: 12px !important; }
.wizard-shell {
  width: min(1640px, calc(100vw - 24px)) !important;
  height: min(980px, calc(100vh - 24px)) !important;
  border-radius: 16px;
}
.wizard-body {
  overflow: auto;
  padding: 14px;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.console-panel,
#wizardConsole { min-width: 0; }
#wizardConsole {
  max-height: 340px;
  overflow: auto;
}
.notice {
  white-space: pre-wrap;
  line-height: 1.55;
}
@media (max-width: 1360px) {
  :root { --shell-rail-width: 228px; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); }
}
@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
  .topbar-center {
    overflow: visible;
  }
  body.nav-open .topbar-center { display: block; }
  .tabs {
    flex-wrap: wrap;
    overflow: visible !important;
  }
  .status-rail {
    width: min(320px, calc(100vw - 24px)) !important;
    top: calc(var(--shell-topbar-height) + 8px) !important;
    max-height: calc(100vh - var(--shell-topbar-height) - 20px);
  }
  .workspace {
    margin-left: 0 !important;
  }
  .hero-panel,
  .catalog-layout,
  .autopilot-grid,
  .two-col {
    grid-template-columns: 1fr !important;
  }
  .catalog-side-panel {
    position: static;
    max-height: none;
  }
}
@media (max-width: 760px) {
  .workspace { padding: 10px !important; }
  .topbar { padding: 10px !important; }
  .hero-panel,
  .panel { padding: 12px !important; }
  .wizard-shell {
    width: calc(100vw - 12px) !important;
    height: calc(100vh - 12px) !important;
  }
  .timeline,
  .detail-grid { grid-template-columns: 1fr; }
}


/* ===== Phase 27G2: fixed-shell layout hotfix =====
   Fixes the large blank area caused by earlier position overrides.
   The command center chrome must be fixed; workspace must start directly below it. */
:root {
  --shell-topbar-height: 92px;
  --shell-rail-width: 240px;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden !important;
}

body[data-shell="meta-mcp"] {
  min-height: 100vh;
}

/* Restore fixed command chrome after previous theme overrides made it relative. */
body[data-shell="meta-mcp"] .topbar {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  z-index: 100 !important;
  width: 100% !important;
}

/* Keep the system rail fixed and aligned under the measured header. */
body[data-shell="meta-mcp"] .status-rail {
  position: fixed !important;
  top: var(--shell-topbar-height, 92px) !important;
  left: 0 !important;
  bottom: 0 !important;
  z-index: 40 !important;
  width: var(--shell-rail-width, 240px) !important;
  max-height: calc(100vh - var(--shell-topbar-height, 92px)) !important;
  overflow: auto !important;
}

/* Workspace should not inherit accidental relative flow offsets. */
body[data-shell="meta-mcp"] .workspace {
  position: relative !important;
  z-index: 1 !important;
  margin-top: var(--shell-topbar-height, 92px) !important;
  margin-left: var(--shell-rail-width, 240px) !important;
  padding: 16px !important;
  min-height: calc(100vh - var(--shell-topbar-height, 92px)) !important;
  max-width: calc(100vw - var(--shell-rail-width, 240px)) !important;
  overflow-x: hidden !important;
}

/* First active page should begin immediately, without phantom vertical gaps. */
body[data-shell="meta-mcp"] .page.active {
  align-content: start !important;
  align-items: start !important;
  justify-content: stretch !important;
  grid-auto-rows: max-content !important;
  gap: 14px !important;
}

body[data-shell="meta-mcp"] .capability-catalog-page > :first-child {
  margin-top: 0 !important;
}

/* Header nav: wrap cleanly without showing the ugly horizontal scrollbar. */
body[data-shell="meta-mcp"] .topbar-center {
  min-width: 0 !important;
  overflow: visible !important;
}

body[data-shell="meta-mcp"] .tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: visible !important;
  max-height: none !important;
}

body[data-shell="meta-mcp"] .tabs::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body[data-shell="meta-mcp"] .tab {
  flex: 0 0 auto !important;
}

/* Prevent oversized hero/panels from being pushed down. */
body[data-shell="meta-mcp"] .hero-panel,
body[data-shell="meta-mcp"] .super-server-hero {
  min-height: 0 !important;
  align-items: center !important;
}

body[data-shell="meta-mcp"] .catalog-layout,
body[data-shell="meta-mcp"] .two-col,
body[data-shell="meta-mcp"] .autopilot-grid {
  min-width: 0 !important;
}

body[data-shell="meta-mcp"] .table-wrap,
body[data-shell="meta-mcp"] pre,
body[data-shell="meta-mcp"] textarea {
  max-width: 100% !important;
}

/* Wizard remains fixed and above the fixed shell. */
body[data-shell="meta-mcp"] .wizard-modal {
  position: fixed !important;
  z-index: 220 !important;
  inset: 0 !important;
}

body[data-shell="meta-mcp"] .wizard-shell {
  width: min(1640px, calc(100vw - 24px)) !important;
  height: min(980px, calc(100vh - 24px)) !important;
}

/* On medium screens use off-canvas rail and remove workspace side margin. */
@media (max-width: 1180px) {
  body[data-shell="meta-mcp"] .status-rail {
    top: calc(var(--shell-topbar-height, 92px) + 8px) !important;
    left: 12px !important;
    bottom: 12px !important;
    width: min(320px, calc(100vw - 24px)) !important;
    max-height: calc(100vh - var(--shell-topbar-height, 92px) - 20px) !important;
    transform: translateX(calc(-100% - 24px));
    opacity: 0;
    pointer-events: none;
  }

  body.rail-open[data-shell="meta-mcp"] .status-rail {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  body[data-shell="meta-mcp"] .workspace {
    margin-left: 0 !important;
    max-width: 100vw !important;
    padding: 12px !important;
  }

  body[data-shell="meta-mcp"] .topbar-center {
    display: none;
    overflow: visible !important;
  }

  body.nav-open[data-shell="meta-mcp"] .topbar-center {
    display: block;
  }

  body[data-shell="meta-mcp"] .tabs {
    overflow: auto !important;
    max-height: 50vh;
  }
}

@media (max-width: 760px) {
  body[data-shell="meta-mcp"] .workspace {
    padding: 10px !important;
  }

  body[data-shell="meta-mcp"] .wizard-shell {
    width: calc(100vw - 12px) !important;
    height: calc(100vh - 12px) !important;
  }
}

/* Phase 27H capability readiness + import summary polish */
body[data-shell="meta-mcp"] .import-summary-panel {
  border-color: rgba(125, 211, 252, 0.24);
  background: linear-gradient(180deg, rgba(4, 16, 30, 0.98), rgba(5, 20, 38, 0.96));
}

body[data-shell="meta-mcp"] .import-summary-panel .section-head {
  align-items: flex-start;
  gap: 12px;
}

body[data-shell="meta-mcp"] .import-summary-narrative {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(10, 25, 45, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.16);
  color: #d7f7ff;
}

body[data-shell="meta-mcp"] .import-summary-narrative strong {
  display: block;
  color: #ffffff;
  margin-bottom: 2px;
}

body[data-shell="meta-mcp"] .import-summary-narrative > div {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 18, 33, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

body[data-shell="meta-mcp"] .tool-views-panel {
  border-color: rgba(124, 242, 165, 0.18);
  background: rgba(5, 18, 34, 0.92);
}

body[data-shell="meta-mcp"] .saved-view-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

body[data-shell="meta-mcp"] .saved-view-row .segment {
  flex: 0 0 auto;
  min-height: 38px;
  padding-inline: 14px;
}

body[data-shell="meta-mcp"] .saved-view-row .segment.active {
  box-shadow: 0 0 0 1px rgba(124, 242, 165, 0.24) inset;
}

body[data-shell="meta-mcp"] .capability-readiness-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 0;
}

body[data-shell="meta-mcp"] .capability-readiness-banner .chip {
  margin: 0;
}

body[data-shell="meta-mcp"] .cap-detail-head {
  margin-bottom: 4px;
}

body[data-shell="meta-mcp"] .checkbox-line.auto-continue-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background: rgba(10, 25, 45, 0.62);
  color: #d7f7ff;
}

body[data-shell="meta-mcp"] .checkbox-line.auto-continue-line input {
  width: 16px;
  height: 16px;
  accent-color: #7dd3fc;
  flex: 0 0 auto;
}

/* Phase 27K: catalog shell alignment toward the capability-centric reference. */
body[data-shell="meta-mcp"] .catalog-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

body[data-shell="meta-mcp"] .catalog-top-grid > * {
  min-width: 0;
}

body[data-shell="meta-mcp"] .super-server-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px !important;
  align-items: stretch !important;
  gap: 20px !important;
  min-height: 272px !important;
  padding: 24px 26px !important;
}

body[data-shell="meta-mcp"] .hero-copy {
  display: grid;
  align-content: start;
  gap: 0;
}

body[data-shell="meta-mcp"] .hero-copy h1 {
  max-width: 820px;
  margin: 8px 0 12px;
  font-size: clamp(2.6rem, 4vw, 4.8rem) !important;
  line-height: 0.96;
}

body[data-shell="meta-mcp"] .hero-copy p {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.65;
}

body[data-shell="meta-mcp"] .hero-badges {
  margin-top: 18px;
}

body[data-shell="meta-mcp"] .hero-badges .chip {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(12, 24, 38, 0.84);
}

body[data-shell="meta-mcp"] .hero-actions {
  display: none !important;
}

body[data-shell="meta-mcp"] .hero-visual-panel {
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-width: 0;
}

body[data-shell="meta-mcp"] .hero-visual-frame {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background:
    radial-gradient(circle at 50% 38%, rgba(53, 151, 255, 0.24), transparent 30%),
    radial-gradient(circle at 82% 22%, rgba(44, 200, 255, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(6, 17, 31, 0.92), rgba(7, 16, 26, 0.98));
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.06);
}

body[data-shell="meta-mcp"] .hero-visual-glow {
  position: absolute;
  inset: 18px;
  border-radius: 20px;
  background:
    radial-gradient(circle at center, rgba(78, 193, 255, 0.16), transparent 40%),
    linear-gradient(135deg, rgba(14, 45, 76, 0.18), transparent 70%);
  filter: blur(4px);
}

body[data-shell="meta-mcp"] .hero-visual-node {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background: linear-gradient(180deg, rgba(10, 32, 55, 0.92), rgba(9, 20, 35, 0.98));
  box-shadow: inset 0 0 24px rgba(59, 130, 246, 0.12), 0 0 0 1px rgba(125, 211, 252, 0.04);
}

body[data-shell="meta-mcp"] .hero-visual-node-top {
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
}

body[data-shell="meta-mcp"] .hero-visual-node-right {
  top: 76px;
  right: 26px;
}

body[data-shell="meta-mcp"] .hero-visual-node-bottom {
  bottom: 24px;
  left: 32px;
}

body[data-shell="meta-mcp"] .hero-visual-core {
  position: absolute;
  inset: 54px 34px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  border-radius: 22px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  background: linear-gradient(180deg, rgba(9, 22, 38, 0.76), rgba(6, 15, 25, 0.94));
}

body[data-shell="meta-mcp"] .hero-visual-kicker {
  color: #7ed7ff;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body[data-shell="meta-mcp"] .hero-visual-core strong {
  color: #eaf6ff;
  font-size: 20px;
  line-height: 1.15;
}

body[data-shell="meta-mcp"] .hero-visual-core small {
  color: #bfd8ea;
  font-size: 12px;
  line-height: 1.55;
}

body[data-shell="meta-mcp"] .hero-secondary-actions {
  display: grid;
  gap: 10px;
}

body[data-shell="meta-mcp"] .hero-secondary-actions button {
  width: 100%;
  min-height: 46px;
  border-radius: 16px;
  background: rgba(19, 40, 61, 0.92);
  color: #deedf9;
}

body[data-shell="meta-mcp"] .catalog-autopilot-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px 24px !important;
}

body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  margin-bottom: 0;
}

body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-head h2 {
  font-size: 22px;
  line-height: 1.25;
}

body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-mode-field {
  align-self: start;
  min-width: 0;
}

body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-input input {
  min-height: 50px;
  border-radius: 14px;
}

body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-inline-actions button {
  min-height: 50px;
  padding-inline: 18px;
  border-radius: 14px;
}

body[data-shell="meta-mcp"] .autopilot-step-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

body[data-shell="meta-mcp"] .autopilot-step {
  display: grid;
  gap: 5px;
  min-height: 84px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background: rgba(8, 18, 31, 0.62);
}

body[data-shell="meta-mcp"] .autopilot-step span {
  color: #e9f6ff;
  font-size: 12px;
  font-weight: 700;
}

body[data-shell="meta-mcp"] .autopilot-step small {
  color: #a9bfd1;
  font-size: 11px;
  line-height: 1.45;
}

body[data-shell="meta-mcp"] .autopilot-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

body[data-shell="meta-mcp"] .autopilot-cta-row .large-cta {
  min-width: 280px;
  min-height: 50px;
  padding-inline: 24px;
}

body[data-shell="meta-mcp"] #catalogCards.catalog-highlight-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}

body[data-shell="meta-mcp"] .metric-highlight {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 106px;
  padding: 14px 16px;
  overflow: hidden;
  border-radius: 18px;
}

body[data-shell="meta-mcp"] .metric-highlight::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -16px;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.18), transparent 68%);
  pointer-events: none;
}

body[data-shell="meta-mcp"] .metric-highlight .label {
  color: #d5e8f7 !important;
  font-size: 10px;
  letter-spacing: 0.11em;
}

body[data-shell="meta-mcp"] .metric-highlight .value {
  margin-top: 0;
  color: #ffffff;
  font-size: 31px;
  line-height: 1;
}

body[data-shell="meta-mcp"] .metric-highlight .meta {
  color: #a9bfd1;
  font-size: 12px;
}

body[data-shell="meta-mcp"] .metric-highlight.cyan { border-color: rgba(90, 203, 255, 0.22); }
body[data-shell="meta-mcp"] .metric-highlight.violet { border-color: rgba(156, 146, 255, 0.24); }
body[data-shell="meta-mcp"] .metric-highlight.teal { border-color: rgba(59, 214, 184, 0.22); }
body[data-shell="meta-mcp"] .metric-highlight.gold { border-color: rgba(241, 209, 138, 0.24); }
body[data-shell="meta-mcp"] .metric-highlight.green { border-color: rgba(124, 242, 165, 0.22); }
body[data-shell="meta-mcp"] .metric-highlight.lime { border-color: rgba(153, 243, 143, 0.22); }
body[data-shell="meta-mcp"] .metric-highlight.mint { border-color: rgba(110, 231, 183, 0.22); }
body[data-shell="meta-mcp"] .metric-highlight.blue { border-color: rgba(125, 211, 252, 0.22); }

body[data-shell="meta-mcp"] .catalog-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr) !important;
  gap: 18px !important;
}

body[data-shell="meta-mcp"] .catalog-side-stack {
  display: grid;
  gap: 18px;
}

body[data-shell="meta-mcp"] .catalog-activity-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 18px !important;
}

body[data-shell="meta-mcp"] .catalog-panel-main .table-wrap.large {
  min-height: 340px;
}

body[data-shell="meta-mcp"] .catalog-console-panel pre {
  min-height: 208px !important;
  max-height: 208px !important;
}

body[data-shell="meta-mcp"] .catalog-fleet-panel .table-wrap.medium,
body[data-shell="meta-mcp"] .catalog-meta-panel .table-wrap.small {
  min-height: 208px;
}

body[data-shell="meta-mcp"] .catalog-top-grid + .catalog-kpi-strip {
  margin-top: 0;
}

@media (max-width: 1500px) {
  body[data-shell="meta-mcp"] #catalogCards.catalog-highlight-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1380px) {
  body[data-shell="meta-mcp"] .catalog-top-grid,
  body[data-shell="meta-mcp"] .catalog-layout,
  body[data-shell="meta-mcp"] .catalog-activity-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-shell="meta-mcp"] .super-server-hero {
    grid-template-columns: 1fr !important;
  }

  body[data-shell="meta-mcp"] .autopilot-step-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-head,
  body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-grid,
  body[data-shell="meta-mcp"] .autopilot-cta-row,
  body[data-shell="meta-mcp"] .autopilot-step-row,
  body[data-shell="meta-mcp"] #catalogCards.catalog-highlight-grid {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }

  body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-inline-actions {
    justify-content: stretch;
  }

  body[data-shell="meta-mcp"] .catalog-autopilot-panel .autopilot-inline-actions button,
  body[data-shell="meta-mcp"] .autopilot-cta-row .large-cta {
    width: 100%;
  }

  body[data-shell="meta-mcp"] .hero-secondary-actions {
    grid-template-columns: 1fr;
  }
}

/* Phase 27L: reference-shell rebuild for tighter screenshot fidelity. */
body[data-shell="meta-mcp"] .topbar {
  min-height: 74px !important;
  padding: 10px 20px !important;
  background: linear-gradient(180deg, rgba(4, 10, 20, 0.96), rgba(4, 10, 20, 0.92)) !important;
  border-bottom: 1px solid rgba(80, 130, 180, 0.16) !important;
  box-shadow: none !important;
}

body[data-shell="meta-mcp"] .topbar-brand {
  gap: 14px;
}

body[data-shell="meta-mcp"] .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #6fd2ff;
  background: rgba(6, 20, 36, 0.9);
  border-color: rgba(86, 180, 255, 0.24);
}

body[data-shell="meta-mcp"] .brand strong {
  font-size: 17px;
  font-weight: 760;
}

body[data-shell="meta-mcp"] .brand span {
  color: #b9cadd !important;
  font-size: 11px;
}

body[data-shell="meta-mcp"] .chrome-toggle {
  min-height: 38px;
  padding-inline: 12px;
  border-radius: 12px;
}

body[data-shell="meta-mcp"] .tabs {
  gap: 6px !important;
}

body[data-shell="meta-mcp"] .topbar .tab {
  position: relative;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border-color: rgba(78, 111, 143, 0.16);
  background: rgba(7, 15, 28, 0.72);
  color: #dce7f3;
  font-size: 12px;
  font-weight: 650;
  box-shadow: none !important;
}

body[data-shell="meta-mcp"] .topbar .tab.active {
  background: rgba(8, 28, 48, 0.94);
  border-color: rgba(86, 180, 255, 0.3);
  color: #7cd8ff;
}

body[data-shell="meta-mcp"] .topbar .tab.active::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #19c1ff, #57d9ff);
}

body[data-shell="meta-mcp"] .topbar [data-tab="overview"],
body[data-shell="meta-mcp"] .topbar [data-tab="host-runtime"],
body[data-shell="meta-mcp"] .topbar [data-tab="ledger"],
body[data-shell="meta-mcp"] .topbar [data-tab="actions"] {
  display: none !important;
}

body[data-shell="meta-mcp"] .operator-pill {
  width: 38px;
  height: 38px;
  color: #eef7ff;
  background: rgba(10, 22, 38, 0.92);
}

body[data-shell="meta-mcp"] .section-dock {
  width: 60px;
  gap: 8px;
}

body[data-shell="meta-mcp"] .dock-link {
  min-height: 56px;
  padding: 10px 4px;
  border-radius: 14px;
  background: rgba(6, 18, 31, 0.92);
}

body[data-shell="meta-mcp"] .dock-link.active {
  background: linear-gradient(180deg, rgba(8, 42, 74, 0.98), rgba(7, 22, 41, 0.96));
  box-shadow: inset 0 0 0 1px rgba(94, 197, 255, 0.12);
}

body[data-shell="meta-mcp"] .dock-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 10px;
}

body[data-shell="meta-mcp"] .dock-label {
  font-size: 10px;
}

body[data-shell="meta-mcp"] .workspace {
  margin-left: 96px !important;
  max-width: calc(100vw - 96px) !important;
  padding: 16px 16px 24px !important;
}

body[data-shell="meta-mcp"] .catalog-reference-shell {
  display: grid;
  gap: 14px;
}

body[data-shell="meta-mcp"] .catalog-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(420px, 0.97fr);
  gap: 14px;
}

body[data-shell="meta-mcp"] .reference-hero,
body[data-shell="meta-mcp"] .reference-autopilot,
body[data-shell="meta-mcp"] .catalog-panel-main,
body[data-shell="meta-mcp"] .catalog-meta-panel,
body[data-shell="meta-mcp"] .catalog-import-panel,
body[data-shell="meta-mcp"] .catalog-console-panel,
body[data-shell="meta-mcp"] .catalog-fleet-panel {
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(5, 18, 34, 0.98), rgba(5, 14, 27, 0.96)) !important;
  border: 1px solid rgba(91, 140, 181, 0.18) !important;
}

body[data-shell="meta-mcp"] .reference-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 240px !important;
  gap: 14px !important;
  min-height: 220px !important;
  padding: 20px !important;
}

body[data-shell="meta-mcp"] .reference-hero-copy {
  display: grid;
  align-content: start;
}

body[data-shell="meta-mcp"] .reference-hero-copy h1 {
  margin: 8px 0 10px;
  font-size: clamp(2.2rem, 3.3vw, 3.55rem) !important;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

body[data-shell="meta-mcp"] .reference-hero-copy p {
  max-width: 630px;
  margin-top: 0;
  color: #cad8e5 !important;
  font-size: 14px;
  line-height: 1.55;
}

body[data-shell="meta-mcp"] .reference-hero-art {
  display: grid;
  align-items: stretch;
}

body[data-shell="meta-mcp"] .hero-art-frame {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(36, 156, 255, 0.22), transparent 24%),
    linear-gradient(180deg, rgba(8, 22, 39, 0.96), rgba(6, 16, 27, 0.98));
  border: 1px solid rgba(82, 164, 255, 0.18);
}

body[data-shell="meta-mcp"] .hero-art-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(61, 109, 156, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 109, 156, 0.12) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.42;
}

body[data-shell="meta-mcp"] .hero-art-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 108, 214, 0.78), rgba(9, 47, 99, 0.95));
  border: 1px solid rgba(90, 196, 255, 0.46);
  box-shadow: 0 0 34px rgba(44, 174, 255, 0.34);
}

body[data-shell="meta-mcp"] .hero-art-orbit {
  position: absolute;
  border-radius: 14px;
  background: rgba(7, 30, 57, 0.94);
  border: 1px solid rgba(86, 180, 255, 0.24);
  box-shadow: 0 0 16px rgba(44, 174, 255, 0.16);
}

body[data-shell="meta-mcp"] .hero-art-orbit.orbit-a {
  top: 22px;
  left: 22px;
  width: 44px;
  height: 44px;
}

body[data-shell="meta-mcp"] .hero-art-orbit.orbit-b {
  top: 28px;
  right: 28px;
  width: 34px;
  height: 34px;
}

body[data-shell="meta-mcp"] .hero-art-orbit.orbit-c {
  right: 26px;
  bottom: 26px;
  width: 52px;
  height: 52px;
}

body[data-shell="meta-mcp"] .hero-badges {
  margin-top: 14px;
}

body[data-shell="meta-mcp"] .hero-badges .chip {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
}

body[data-shell="meta-mcp"] .reference-autopilot {
  display: grid;
  gap: 12px;
  padding: 16px 18px !important;
}

body[data-shell="meta-mcp"] .reference-autopilot-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: start;
}

body[data-shell="meta-mcp"] .reference-autopilot-head h2 {
  margin-bottom: 6px;
  color: #78d7ff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body[data-shell="meta-mcp"] .reference-autopilot-head p {
  font-size: 12px;
  line-height: 1.45;
}

body[data-shell="meta-mcp"] .reference-mode-field {
  display: grid;
  gap: 6px;
  color: #d2deea;
}

body[data-shell="meta-mcp"] .reference-autopilot-input-row .autopilot-input {
  display: grid;
  gap: 8px;
}

body[data-shell="meta-mcp"] .reference-autopilot-input-row input,
body[data-shell="meta-mcp"] .reference-mode-field select {
  min-height: 42px;
  border-radius: 10px;
  background: rgba(6, 16, 28, 0.88);
  border-color: rgba(88, 147, 196, 0.24);
}

body[data-shell="meta-mcp"] .reference-autopilot-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

body[data-shell="meta-mcp"] .reference-autopilot-steps > div {
  min-height: 70px;
  padding: 8px 6px;
  border-radius: 12px;
  text-align: center;
  background: rgba(4, 16, 28, 0.72);
  border: 1px solid rgba(83, 132, 175, 0.14);
}

body[data-shell="meta-mcp"] .reference-autopilot-steps strong {
  display: block;
  color: #dff1ff;
  font-size: 11px;
  line-height: 1.3;
}

body[data-shell="meta-mcp"] .reference-autopilot-steps small {
  display: block;
  margin-top: 4px;
  color: #96b0c7;
  font-size: 10px;
}

body[data-shell="meta-mcp"] .reference-autopilot-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

body[data-shell="meta-mcp"] .reference-autopilot-actions .primary {
  min-height: 44px;
  padding-inline: 18px;
}

body[data-shell="meta-mcp"] .autopilot-status {
  margin-top: 0;
  border-radius: 12px;
  font-size: 12px;
}

body[data-shell="meta-mcp"] .catalog-kpi-strip {
  display: block;
}

body[data-shell="meta-mcp"] #catalogCards.catalog-highlight-grid {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-shell="meta-mcp"] .metric-highlight {
  min-height: 86px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8, 24, 42, 0.96), rgba(5, 15, 27, 0.94));
}

body[data-shell="meta-mcp"] .metric-highlight .value {
  font-size: 28px;
}

body[data-shell="meta-mcp"] .metric-highlight .meta {
  font-size: 11px;
}

body[data-shell="meta-mcp"] .catalog-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.58fr) minmax(320px, 0.62fr);
  gap: 14px;
}

body[data-shell="meta-mcp"] .catalog-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 14px;
}

body[data-shell="meta-mcp"] .compact-head {
  align-items: start;
}

body[data-shell="meta-mcp"] .compact-head h2 {
  margin-bottom: 4px;
  color: #78d7ff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body[data-shell="meta-mcp"] .catalog-panel-main .table-wrap.large,
body[data-shell="meta-mcp"] .catalog-import-panel .latest-job-card,
body[data-shell="meta-mcp"] .catalog-fleet-panel .table-wrap.medium {
  min-height: 250px;
}

body[data-shell="meta-mcp"] .catalog-console-panel pre {
  min-height: 210px !important;
  max-height: 210px !important;
  font-size: 12px;
  line-height: 1.55;
}

body[data-shell="meta-mcp"] .catalog-import-panel .button-row,
body[data-shell="meta-mcp"] .catalog-meta-panel .button-row {
  margin-top: 12px;
}

body[data-shell="meta-mcp"] .catalog-import-panel .latest-job-card {
  min-height: 198px;
}

body[data-shell="meta-mcp"] .meta-tool-list {
  display: grid;
  gap: 10px;
  min-height: 250px;
}

body[data-shell="meta-mcp"] .meta-tool-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(7, 18, 31, 0.76);
  border: 1px solid rgba(84, 135, 180, 0.14);
}

body[data-shell="meta-mcp"] .meta-tool-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(13, 37, 63, 0.96);
  color: #7ed7ff;
  font-size: 12px;
  font-weight: 800;
}

body[data-shell="meta-mcp"] .meta-tool-copy {
  display: grid;
  gap: 4px;
}

body[data-shell="meta-mcp"] .meta-tool-copy strong {
  color: #f3f8ff;
  font-size: 13px;
}

body[data-shell="meta-mcp"] .meta-tool-copy span {
  color: #9ab4c9;
  font-size: 11px;
  line-height: 1.4;
}

body[data-shell="meta-mcp"] .meta-tool-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(28, 84, 49, 0.82);
  border: 1px solid rgba(104, 223, 144, 0.24);
  color: #8ef0ad;
  font-size: 11px;
  font-weight: 700;
}

body[data-shell="meta-mcp"] .latest-job-top {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

body[data-shell="meta-mcp"] .latest-job-top small {
  color: #a6bbcd;
  font-size: 11px;
}

body[data-shell="meta-mcp"] .latest-job-warning {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(84, 59, 8, 0.24);
  border: 1px solid rgba(208, 156, 45, 0.24);
}

body[data-shell="meta-mcp"] .latest-job-warning strong {
  color: #ffd36f;
  font-size: 12px;
}

body[data-shell="meta-mcp"] .latest-job-warning span {
  color: #dcbf84;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 1550px) {
  body[data-shell="meta-mcp"] #catalogCards.catalog-highlight-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1380px) {
  body[data-shell="meta-mcp"] .catalog-top-grid,
  body[data-shell="meta-mcp"] .catalog-main-grid,
  body[data-shell="meta-mcp"] .catalog-bottom-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-shell="meta-mcp"] .reference-hero {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 1100px) {
  body[data-shell="meta-mcp"] .reference-autopilot-head,
  body[data-shell="meta-mcp"] .reference-autopilot-steps,
  body[data-shell="meta-mcp"] #catalogCards.catalog-highlight-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Phase 27I enterprise polish: softer glow, stronger contrast, cleaner states. */
body[data-shell="meta-mcp"] {
  --phase27i-muted: #b8c9d3;
  --phase27i-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  --phase27i-border: rgba(125, 211, 252, 0.18);
}

body[data-shell="meta-mcp"] .panel,
body[data-shell="meta-mcp"] .hero-panel,
body[data-shell="meta-mcp"] .status-rail,
body[data-shell="meta-mcp"] .modal-card {
  box-shadow: var(--phase27i-shadow) !important;
  backdrop-filter: blur(10px) !important;
}

body[data-shell="meta-mcp"] .super-server-hero,
body[data-shell="meta-mcp"] .autopilot-panel {
  border-color: var(--phase27i-border) !important;
}

body[data-shell="meta-mcp"] .super-server-hero::after {
  opacity: 0.58;
}

body[data-shell="meta-mcp"] .large-cta,
body[data-shell="meta-mcp"] .primary,
body[data-shell="meta-mcp"] button.primary,
body[data-shell="meta-mcp"] .floating-import {
  box-shadow: 0 12px 28px rgba(96, 165, 250, 0.18) !important;
}

body[data-shell="meta-mcp"] .tab:not(.primary-tab),
body[data-shell="meta-mcp"] button:not(.primary):not(.chrome-toggle),
body[data-shell="meta-mcp"] .segment {
  min-height: 38px;
  border-radius: 12px;
}

body[data-shell="meta-mcp"] .tab {
  padding-inline: 14px;
  font-weight: 650;
}

body[data-shell="meta-mcp"] .muted,
body[data-shell="meta-mcp"] .brand span,
body[data-shell="meta-mcp"] .page-head p,
body[data-shell="meta-mcp"] .hero-copy p,
body[data-shell="meta-mcp"] .metric .label,
body[data-shell="meta-mcp"] .detail-item span,
body[data-shell="meta-mcp"] .action-feed-meta,
body[data-shell="meta-mcp"] .action-feed-summary,
body[data-shell="meta-mcp"] .status-rail dt,
body[data-shell="meta-mcp"] .table-empty-state small,
body[data-shell="meta-mcp"] .empty-state span {
  color: var(--phase27i-muted) !important;
}

body[data-shell="meta-mcp"] .empty-state,
body[data-shell="meta-mcp"] .table-empty-state,
body[data-shell="meta-mcp"] .action-feed-empty {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(8, 18, 31, 0.78);
  border: 1px dashed var(--phase27i-border);
  color: #d7f7ff;
}

body[data-shell="meta-mcp"] .table-empty-cell {
  padding: 0 !important;
}

body[data-shell="meta-mcp"] .table-empty-state {
  text-align: left;
  vertical-align: middle;
}

body[data-shell="meta-mcp"] .table-empty-state strong,
body[data-shell="meta-mcp"] .empty-state strong {
  display: block;
  color: #ffffff;
  font-weight: 750;
}

body[data-shell="meta-mcp"] .table-empty-state small,
body[data-shell="meta-mcp"] .empty-state span {
  display: block;
  line-height: 1.5;
}

/* Phase 27J shell realignment: closer to the capability-centric reference layout. */
body[data-shell="meta-mcp"] {
  --shell-dock-width: 76px;
  --shell-status-width: 320px;
}

body[data-shell="meta-mcp"] .topbar {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 16px !important;
  min-height: 72px !important;
  padding: 14px 18px !important;
}

body[data-shell="meta-mcp"] .topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body[data-shell="meta-mcp"] .brand-mark,
body[data-shell="meta-mcp"] .operator-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background: linear-gradient(180deg, rgba(14, 29, 49, 0.96), rgba(9, 19, 33, 0.94));
  color: #8fdcff;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body[data-shell="meta-mcp"] .operator-pill {
  color: #dce8f7;
  width: 40px;
  height: 40px;
  border-radius: 999px;
}

body[data-shell="meta-mcp"] .topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

body[data-shell="meta-mcp"] .topbar-center {
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-shell="meta-mcp"] .tabs {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  align-items: center !important;
  gap: 10px !important;
  padding-bottom: 0 !important;
  max-height: none !important;
  scrollbar-width: none;
}

body[data-shell="meta-mcp"] .tab {
  flex: 0 0 auto !important;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 16px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

body[data-shell="meta-mcp"] .section-dock {
  position: fixed;
  top: calc(var(--shell-topbar-height, 92px) + 12px);
  left: 14px;
  bottom: 14px;
  z-index: 36;
  display: grid;
  grid-auto-rows: max-content;
  gap: 10px;
  width: var(--shell-dock-width);
}

body[data-shell="meta-mcp"] .dock-link {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 54px;
  padding: 10px 6px;
  border-radius: 18px;
  background: rgba(10, 18, 30, 0.88);
}

body[data-shell="meta-mcp"] .dock-link.active {
  border-color: rgba(125, 211, 252, 0.55);
  background: linear-gradient(180deg, rgba(15, 41, 68, 0.96), rgba(9, 22, 37, 0.94));
}

body[data-shell="meta-mcp"] .dock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(125, 211, 252, 0.12);
  color: #8fdcff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body[data-shell="meta-mcp"] .dock-label {
  color: #c4d5e6;
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
}

body[data-shell="meta-mcp"] .status-rail {
  left: calc(14px + var(--shell-dock-width) + 14px) !important;
  width: var(--shell-status-width) !important;
  transform: translateX(calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

body.rail-open[data-shell="meta-mcp"] .status-rail {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

body[data-shell="meta-mcp"] .workspace {
  margin-left: calc(14px + var(--shell-dock-width) + 18px) !important;
  max-width: calc(100vw - (14px + var(--shell-dock-width) + 18px)) !important;
}

body[data-active-tab="catalog"] #catalog.page.active {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr) !important;
  gap: 18px !important;
}

body[data-active-tab="catalog"] #catalog > .super-server-hero {
  order: 1;
  grid-column: 1;
}

body[data-active-tab="catalog"] #catalog > .catalog-autopilot-panel {
  order: 2;
  grid-column: 2;
}

body[data-active-tab="catalog"] #catalog > .catalog-kpi-strip {
  order: 3;
  grid-column: 1 / -1;
}

body[data-active-tab="catalog"] #catalog > .catalog-layout {
  order: 4;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 18px;
}

body[data-active-tab="catalog"] #catalog > .catalog-activity-grid {
  order: 5;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 18px;
}

body[data-active-tab="catalog"] #catalog > .capability-command-deck {
  order: 6;
  grid-column: 1 / -1;
}

body[data-active-tab="catalog"] #catalog > .model-routing-matrix {
  order: 7;
  grid-column: 1 / -1;
}

body[data-active-tab="catalog"] #catalog > .catalog-selected-panel {
  order: 8;
  grid-column: 1 / -1;
}

body[data-active-tab="catalog"] #catalog > .model-workflow-panel {
  order: 9;
  grid-column: 1 / -1;
}

body[data-shell="meta-mcp"] .catalog-kpi-strip {
  display: block;
}

body[data-shell="meta-mcp"] .catalog-kpi-strip .metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

body[data-shell="meta-mcp"] .catalog-kpi-strip .metric {
  min-height: 96px;
}

body[data-shell="meta-mcp"] .catalog-side-stack {
  display: grid;
  gap: 18px;
}

body[data-shell="meta-mcp"] .catalog-console-panel pre {
  min-height: 220px;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(4, 12, 22, 0.92);
  border: 1px solid rgba(125, 211, 252, 0.12);
  color: #d6f5ff;
  line-height: 1.6;
}

body[data-shell="meta-mcp"] .catalog-fleet-panel .table-wrap,
body[data-shell="meta-mcp"] .catalog-panel-main .table-wrap,
body[data-shell="meta-mcp"] .catalog-meta-panel .table-wrap {
  margin-top: 8px;
}

@media (max-width: 1320px) {
  body[data-shell="meta-mcp"] .topbar {
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) auto !important;
  }

  body[data-active-tab="catalog"] #catalog.page.active {
    grid-template-columns: 1fr !important;
  }

  body[data-active-tab="catalog"] #catalog > .super-server-hero,
  body[data-active-tab="catalog"] #catalog > .catalog-autopilot-panel {
    grid-column: 1 / -1;
  }

  body[data-active-tab="catalog"] #catalog > .catalog-layout,
  body[data-active-tab="catalog"] #catalog > .catalog-activity-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  body[data-shell="meta-mcp"] .section-dock {
    display: none;
  }

  body[data-shell="meta-mcp"] .workspace {
    margin-left: 0 !important;
    max-width: 100vw !important;
  }

  body[data-shell="meta-mcp"] .status-rail {
    left: 12px !important;
  }
}


/* === Phase 27F visual analytics polish === */
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(38, 149, 255, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(0, 224, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #03111f 0%, #051528 48%, #04101d 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(85, 160, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 160, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.24;
}
.topbar, .section-dock, .status-rail, .panel, .metric, .detail-item, .tab {
  backdrop-filter: blur(12px);
}
.topbar {
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(19, 75, 138, 0.82), rgba(9, 26, 49, 0.94));
  border: 1px solid rgba(110, 205, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset, 0 10px 28px rgba(0,0,0,0.36), 0 0 24px rgba(55, 145, 255, 0.20);
}
.brand-mark svg {
  width: 26px;
  height: 26px;
}
.operator-pill {
  background: linear-gradient(180deg, rgba(25, 64, 111, 0.85), rgba(13, 27, 49, 0.96));
  border-color: rgba(125, 185, 255, 0.30);
}
.tabs .tab, #refreshBtn, .chrome-toggle {
  border-radius: 14px;
}
.tab.active, .tab.import-tab, .primary, button.primary, .large-cta {
  box-shadow: 0 0 0 1px rgba(108, 217, 255, 0.22) inset, 0 10px 28px rgba(0, 0, 0, 0.22);
}
.section-dock {
  width: 74px;
  gap: 12px;
  padding-top: 18px;
  background: linear-gradient(180deg, rgba(3,15,27,0.95), rgba(6,18,32,0.92));
}
.dock-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 62px;
  padding: 10px 6px;
  border-radius: 18px;
  align-items: center;
  justify-content: center;
}
.dock-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(23, 60, 103, 0.95), rgba(11, 23, 44, 0.95));
  border: 1px solid rgba(91, 173, 255, 0.28);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}
.dock-icon svg {
  width: 18px;
  height: 18px;
  fill: #8ad9ff;
}
.dock-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status-rail {
  width: 250px;
  background: linear-gradient(180deg, rgba(6,17,31,0.95), rgba(8,20,35,0.92));
}
.workspace {
  padding-left: 20px;
  padding-right: 20px;
}
.super-server-hero {
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(220px, 0.8fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: stretch;
  background:
    linear-gradient(180deg, rgba(5, 20, 38, 0.96), rgba(4, 18, 34, 0.94)),
    radial-gradient(circle at center, rgba(41,133,255,0.12), transparent 38%);
}
.hero-copy h1 {
  font-size: clamp(42px, 4vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 6ch;
  margin-bottom: 16px;
}
.hero-copy p {
  max-width: 58ch;
  font-size: 15px;
  line-height: 1.55;
}
.hero-badges {
  gap: 10px;
}
.hero-visual {
  position: relative;
  min-height: 320px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(85, 172, 255, 0.18);
  background: linear-gradient(180deg, rgba(8, 28, 51, 0.95), rgba(4, 15, 31, 0.95));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 22px 50px rgba(0,0,0,0.28);
}
.hero-grid, .hero-scanline {
  position: absolute;
  inset: 0;
}
.hero-grid {
  background-image:
    linear-gradient(rgba(92, 156, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 156, 255, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero-scanline {
  background: linear-gradient(180deg, transparent 0%, rgba(72, 185, 255, 0.08) 52%, transparent 100%);
  animation: hero-scan 6s linear infinite;
}
@keyframes hero-scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
.hero-cube {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  border-radius: 28px;
  border: 1px solid rgba(92, 176, 255, 0.18);
  background: radial-gradient(circle at center, rgba(36, 134, 255, 0.16), transparent 55%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}
.hero-cube::before, .hero-cube::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 20px;
  border: 1px solid rgba(91, 181, 255, 0.18);
}
.hero-cube::after {
  inset: 56px;
  border-radius: 16px;
}
.hero-cube-core {
  position: absolute;
  width: 72px;
  height: 72px;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(39,133,255,0.95), rgba(17,77,162,0.96));
  box-shadow: 0 0 0 1px rgba(180, 225, 255, 0.14) inset, 0 0 28px rgba(59, 157, 255, 0.55), 0 16px 40px rgba(0,0,0,0.35);
}
.hero-node {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid rgba(90, 174, 255, 0.34);
  background: linear-gradient(180deg, rgba(13, 57, 99, 0.9), rgba(8, 28, 53, 0.95));
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
.node-a { top: 18px; left: 18px; }
.node-b { top: 18px; right: 18px; }
.node-c { bottom: 18px; left: 18px; }
.node-d { bottom: 18px; right: 18px; }
.hero-actions {
  align-self: stretch;
  justify-content: center;
  background: linear-gradient(180deg, rgba(7,21,37,0.78), rgba(6,18,31,0.42));
  border: 1px solid rgba(78, 132, 184, 0.18);
  border-radius: 24px;
  padding: 20px;
}
.hero-actions .large-cta {
  background: linear-gradient(90deg, rgba(48,154,255,0.96), rgba(39,228,162,0.94) 82%, rgba(255,193,79,0.88));
  color: #08121f;
  font-weight: 800;
}
.command-deck-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.command-card {
  position: relative;
  min-height: 132px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(11,29,50,0.96), rgba(8,20,36,0.95));
  border: 1px solid rgba(74, 149, 217, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 16px 28px rgba(0,0,0,0.24);
}
.command-card span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(24,93,168,0.9), rgba(12,40,74,0.95));
  margin-bottom: 14px;
}
.metric-highlight {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  min-height: 132px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(11,27,46,0.98), rgba(7,18,34,0.96));
  border: 1px solid rgba(78, 150, 217, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 18px 28px rgba(0,0,0,0.22);
}
.metric-highlight::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 188, 255, 0.12), transparent 70%);
}
.metric-top, .metric-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.metric-top { margin-bottom: 8px; }
.metric-title-wrap { min-width: 0; }
.metric-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(19, 69, 124, 0.9), rgba(9, 28, 49, 0.94));
  border: 1px solid rgba(93, 170, 255, 0.24);
  box-shadow: 0 12px 22px rgba(0,0,0,0.22);
}
.metric-icon svg { width: 18px; height: 18px; fill: currentColor; }
.metric-highlight.cyan { color: #7ed7ff; }
.metric-highlight.violet { color: #bb92ff; }
.metric-highlight.teal { color: #53f2d0; }
.metric-highlight.gold { color: #ffcf79; }
.metric-highlight.green { color: #5ef0a1; }
.metric-highlight.lime { color: #98f06b; }
.metric-highlight.mint { color: #71f1ea; }
.metric-highlight.blue { color: #84b8ff; }
.metric-highlight .label {
  color: rgba(230, 240, 255, 0.84);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.metric-badge {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(124, 180, 255, 0.16);
  background: rgba(6, 18, 29, 0.55);
  color: rgba(223, 235, 252, 0.78);
  font-size: 11px;
}
.metric-highlight .value {
  font-size: 34px;
  line-height: 1;
  color: #f2f8ff;
}
.metric-highlight .meta { color: var(--muted); font-size: 12px; margin-top: 10px; }
.metric-chart { margin-top: 12px; }
.metric-chart svg { width: 100%; height: 34px; display: block; }
.metric-progress { height: 5px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.metric-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, currentColor, rgba(255,255,255,0.8)); }
.metric-ring { width: 62px; height: 62px; }
.metric-ring svg { width: 62px; height: 62px; }
.metric-ring text { font-size: 11px; fill: #eff7ff; font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
.catalog-panel-main, .catalog-panel-side, .catalog-console-panel, .catalog-fleet-panel {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(7, 21, 38, 0.96), rgba(6, 18, 32, 0.94));
}
.table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}
.table-wrap thead th {
  position: sticky;
  top: 0;
  background: rgba(7, 21, 38, 0.98);
  z-index: 1;
}
.quality-cell { display: grid; gap: 6px; }
.quality-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  width: 88px;
}
.quality-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3aa0ff, #5dffa8);
}
.impact-pill, .status-chip, .mini-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}
.impact-pill.high, .mini-chip.high { color: #ffb65f; background: rgba(95, 50, 2, 0.34); border-color: rgba(255,181,95,0.22); }
.impact-pill.medium, .mini-chip.medium { color: #96dbff; background: rgba(16, 55, 79, 0.34); border-color: rgba(96,190,255,0.22); }
.impact-pill.low, .mini-chip.low { color: #72e7bf; background: rgba(8, 74, 57, 0.32); border-color: rgba(90,213,170,0.22); }
.status-chip.pass, .meta-tool-badge { color: #87ecb4; background: rgba(6, 85, 50, 0.32); border-color: rgba(124, 229, 170, 0.22); }
.status-chip.running { color: #90d7ff; background: rgba(12, 71, 110, 0.34); border-color: rgba(109, 189, 255, 0.22); }
.status-chip.warn { color: #ffcb77; background: rgba(93, 61, 7, 0.32); border-color: rgba(255, 202, 107, 0.22); }
.status-chip.fail { color: #ff9aa7; background: rgba(96, 17, 39, 0.32); border-color: rgba(255, 125, 142, 0.22); }
.capability-cell strong { display: block; color: #eaf4ff; }
.capability-cell small { display: block; color: var(--muted); margin-top: 4px; }
.cap-row-action {
  background: linear-gradient(180deg, rgba(21, 79, 139, 0.9), rgba(10, 33, 60, 0.95));
}
.meta-tool-row {
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(86, 149, 206, 0.18);
  background: linear-gradient(180deg, rgba(9, 28, 49, 0.96), rgba(7, 18, 31, 0.95));
}
.meta-tool-icon {
  width: 38px; height: 38px; border-radius: 13px;
  background: linear-gradient(180deg, rgba(17,85,151,0.92), rgba(11,36,62,0.96));
  border: 1px solid rgba(93,170,255,0.22);
}
.meta-tool-icon svg { width: 18px; height: 18px; fill: #8adfff; }
.catalog-console-panel pre {
  min-height: 210px;
  border-radius: 16px;
  border: 1px solid rgba(83, 136, 192, 0.16);
  background: linear-gradient(180deg, rgba(3, 14, 20, 0.92), rgba(4, 17, 26, 0.98));
  color: #d7f6cf;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.latest-job-warning {
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 199, 95, 0.20);
  background: rgba(67, 47, 8, 0.22);
}
.autopilot-panel, .capability-command-deck {
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(7,21,38,0.96), rgba(6,18,32,0.94));
}
.autopilot-actions .primary {
  background: linear-gradient(90deg, rgba(63, 177, 255, 0.96), rgba(37, 210, 157, 0.94), rgba(255, 198, 91, 0.86));
  color: #06111b;
  font-weight: 800;
}
.catalog-bottom-grid { align-items: start; }
@media (max-width: 1480px) {
  .super-server-hero { grid-template-columns: 1fr; }
  .command-deck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1120px) {
  .metric-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Phase 27G premium finishing layer */
body[data-shell="meta-mcp"] {
  --workspace-max: 1760px;
}
.shell-bg {
  position: fixed;
  inset: auto auto 0 0;
  width: 46vw;
  height: 46vw;
  border-radius: 999px;
  filter: blur(96px);
  opacity: .12;
  pointer-events: none;
  z-index: 0;
}
.shell-bg-a { top: 84px; left: -12vw; background: radial-gradient(circle, rgba(34,141,255,.88), transparent 68%); }
.shell-bg-b { right: -12vw; top: 160px; left: auto; background: radial-gradient(circle, rgba(67,225,168,.5), transparent 62%); }
.shell-grid {
  position: fixed;
  inset: 76px 0 0 0;
  background-image: linear-gradient(rgba(74,116,177,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(74,116,177,.08) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.42), transparent 72%);
  pointer-events: none;
  z-index: 0;
}
.topbar, .section-dock, .status-rail, .workspace { position: relative; z-index: 2; }
.topbar {
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(4,12,24,.94), rgba(4,12,24,.84));
  border-bottom: 1px solid rgba(88, 154, 223, 0.16);
}
.topbar-center { overflow: hidden; }
.tabs {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  min-height: 42px;
  box-shadow: inset 0 0 0 1px rgba(111,160,227,.12), 0 10px 24px rgba(1,8,15,.24);
}
.primary-tab.active, .import-tab.active, .tab.active {
  box-shadow: 0 0 0 1px rgba(109, 205, 255, .35), 0 0 24px rgba(21, 126, 226, .22), inset 0 0 0 1px rgba(255,255,255,.05);
}
.section-dock {
  width: 92px;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(5,15,28,.92), rgba(5,15,28,.7));
}
.dock-link { gap: 10px; }
.dock-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(109,160,225,.14), 0 10px 24px rgba(0,0,0,.18);
}
.workspace {
  max-width: 1780px;
}
.super-server-hero {
  grid-template-columns: minmax(340px,1.12fr) minmax(280px,.88fr) minmax(260px,.7fr);
  gap: 24px;
  min-height: 340px;
}
.hero-panel, .panel, .autopilot-panel, .capability-command-deck {
  box-shadow: 0 18px 44px rgba(1, 10, 20, 0.28), inset 0 0 0 1px rgba(99,151,215,.08);
}
.hero-copy h1 {
  font-size: clamp(42px, 4vw, 74px);
  line-height: .92;
  max-width: 560px;
}
.hero-copy p { max-width: 540px; font-size: 15px; }
.hero-badges .chip { box-shadow: 0 0 0 1px rgba(106,171,238,.12) inset; }
.hero-visual { min-height: 280px; }
.hero-cube {
  transform: perspective(980px) rotateY(-16deg) rotateX(14deg);
}
.hero-cube-core {
  box-shadow: 0 0 0 1px rgba(101,172,255,.24), 0 0 32px rgba(31,119,255,.45), inset 0 0 38px rgba(129,213,255,.18);
}
.hero-actions {
  align-content: start;
  padding-top: 18px;
}
.hero-actions .large-cta, .floating-import-fab {
  background: linear-gradient(135deg, rgba(64,171,255,.98), rgba(49,224,162,.98) 58%, rgba(255,205,97,.9));
  color: #04111b;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(15, 120, 224, .28);
}
.command-deck-grid {
  gap: 16px;
  grid-template-columns: repeat(5, minmax(0,1fr));
}
.command-card {
  min-height: 132px;
  box-shadow: inset 0 0 0 1px rgba(97, 152, 219, 0.12);
}
.catalog-highlight-grid {
  gap: 16px;
  grid-template-columns: repeat(8, minmax(0,1fr));
}
.metric-highlight {
  min-height: 166px;
  padding: 18px 16px 16px;
  overflow: hidden;
}
.metric-highlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0, rgba(110,190,255,.12), transparent 38%);
  pointer-events: none;
}
.metric-highlight .metric-top {
  align-items: flex-start;
  margin-bottom: 14px;
}
.metric-highlight .metric-title-wrap {
  flex: 1;
}
.metric-highlight .metric-title-wrap small {
  display: block;
  margin-top: 3px;
  color: rgba(196,214,238,.68);
  font-size: 11px;
}
.metric-highlight .metric-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.metric-highlight .value {
  position: relative;
  z-index: 1;
  font-size: 36px;
  letter-spacing: -.03em;
}
.metric-delta {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(154, 228, 188, .82);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.metric-chart { width: 96px; min-width: 96px; }
.metric-chart svg { height: 42px; }
.metric-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 11px;
  color: rgba(191, 209, 232, .76);
}
.metric-foot-badge {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(112, 170, 227, .18);
  color: rgba(235,244,255,.86);
}
.catalog-main-grid {
  grid-template-columns: minmax(540px, 1.25fr) minmax(360px, .62fr) minmax(330px, .56fr);
  gap: 18px;
}
.catalog-bottom-grid {
  grid-template-columns: minmax(460px, 1fr) minmax(420px, 1.15fr);
}
.table-wrap.large { max-height: 580px; }
.table-wrap.medium { max-height: 300px; }
.table-wrap::-webkit-scrollbar, .tabs::-webkit-scrollbar { width: 10px; height: 10px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(115,153,201,.34); border-radius: 999px; }
#catalogCapabilitiesTable tbody tr:hover,
#catalogFleetTable tbody tr:hover {
  background: rgba(19, 52, 86, .38);
}
#catalogCapabilitiesTable th,
#catalogCapabilitiesTable td,
#catalogFleetTable th,
#catalogFleetTable td {
  font-size: 12px;
}
#catalogCapabilitiesTable td { vertical-align: middle; }
.cap-row-action {
  padding: 7px 12px;
  border-radius: 999px;
}
.catalog-meta-panel .meta-tool-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
}
.catalog-meta-panel .meta-tool-row strong { display: block; }
.catalog-meta-panel .meta-tool-row small { color: rgba(190,208,231,.72); }
.latest-job-card {
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(8, 22, 38, .95), rgba(5, 15, 28, .96));
  border: 1px solid rgba(93, 148, 210, .16);
}
.latest-job-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.latest-job-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.latest-job-progress-row { display: flex; justify-content: space-between; margin-top: 12px; margin-bottom: 8px; font-size: 12px; color: rgba(194,210,230,.8); }
.job-top-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.job-top-stats > div {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(90,146,205,.12);
}
.job-top-stats label {
  display: block;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(160,185,214,.68);
  margin-bottom: 6px;
}
.job-top-stats strong { font-size: 12px; line-height: 1.4; }
.job-kv.premium-grid { margin-top: 14px; }
.catalog-console-panel pre {
  min-height: 168px;
  font-size: 12px;
  line-height: 1.65;
  overflow: auto;
  white-space: pre-wrap;
}
.console-stamp { color: rgba(148,176,206,.78); }
.console-level.info, .console-level.running { color: #7fd8ff; }
.console-level.pass { color: #84f0a8; }
.console-level.warn { color: #ffd27a; }
.console-level.fail { color: #ff929f; }
.console-stage { color: rgba(235, 244, 255, .86); }
.catalog-fleet-panel .table-wrap { border-radius: 16px; overflow: hidden; }
.floating-import-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  border-radius: 18px;
}
.floating-import-fab .fab-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(4,17,28,.18);
  font-size: 24px;
  line-height: 1;
}
.floating-import-fab .fab-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}
.floating-import-fab .fab-copy strong { font-size: 14px; }
.floating-import-fab .fab-copy small { color: rgba(4,17,28,.72); font-size: 11px; }
@media (max-width: 1640px) {
  .catalog-highlight-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .catalog-main-grid { grid-template-columns: 1fr 1fr; }
  .catalog-import-panel { grid-column: 1 / -1; }
}
@media (max-width: 1320px) {
  .super-server-hero { grid-template-columns: 1fr; }
  .command-deck-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .catalog-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .catalog-highlight-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .catalog-main-grid { grid-template-columns: 1fr; }
  .job-top-stats { grid-template-columns: 1fr; }
  .floating-import-fab { right: 14px; bottom: 14px; padding: 12px 14px; }
  .floating-import-fab .fab-copy { display: none; }
}
