:root {
  --bg: #05070b;
  --panel: #0c1018;
  --panel-2: #121826;
  --panel-3: #171f31;
  --line: #25304a;
  --line-strong: #34415f;
  --text: #ecf2ff;
  --muted: #95a3c7;
  --dim: #6f7da0;
  --green: #4ade80;
  --yellow: #facc15;
  --red: #fb7185;
  --blue: #60a5fa;
  --violet: #818cf8;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, rgba(96, 165, 250, 0.12), transparent 28%), var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  padding: 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

.shell {
  max-width: 1480px;
  margin: 0 auto;
}

.topbar,
.hero,
.summary-grid,
.data-card,
.toolbar,
.notice,
.results-meta,
.list-card,
.lane-card,
.pixel-host {
  border: 1px solid var(--line);
  background: rgba(12, 16, 24, 0.92);
  box-shadow: var(--shadow);
}

.topbar,
.hero,
.data-card,
.toolbar,
.notice,
.results-meta,
.lane-card,
.pixel-host {
  border-radius: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.backlink:hover {
  color: var(--text);
}

.topbar-copy h1,
.hero h2,
.list-heading h3,
.pixel-room h3,
.metric-card strong {
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.build-stamp,
.results-meta,
.meta-chip,
.detail-list code,
.run-line,
.pill,
.metric-card span,
.badge,
.view-toggle button,
.chip,
.select-wrap select,
.search input {
  font-family: var(--mono);
}

.build-stamp {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  gap: 20px;
  padding: 26px;
}

.hero h2 {
  font-size: 34px;
  line-height: 1.1;
}

.hero-copy {
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-badges,
.summary-grid,
.lane-grid,
.filter-chips,
.view-toggle,
.meta-row,
.surface-list,
.capability-list,
.path-list,
.pixel-floor,
.host-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.data-mode-panel,
.lane-grid {
  display: grid;
  gap: 14px;
}

.lane-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.data-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.import-controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.import-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.import-label input {
  max-width: 260px;
  color: var(--muted);
}

.import-controls button {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

.import-controls button:disabled,
.select-wrap select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.path-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.path-note code {
  font-family: var(--mono);
}

.metric-card {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(18, 24, 38, 0.92);
  min-height: 104px;
}

.metric-card span {
  display: block;
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-card strong {
  display: block;
  padding-top: 14px;
  font-size: 28px;
}

.metric-card p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}

.search,
.select-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.search input,
.select-wrap select {
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.filter-chips,
.view-toggle {
  background: var(--panel-2);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.chip,
.view-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.chip.active,
.view-toggle button.active {
  background: var(--panel-3);
  color: var(--text);
}

.notice,
.results-meta {
  padding: 14px 18px;
  color: var(--muted);
  line-height: 1.6;
}

.view-panel {
  display: grid;
  gap: 16px;
}

.empty-state {
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(18, 24, 38, 0.55);
}

.compact-state {
  margin-top: 18px;
  padding: 18px;
}

.list-card {
  border-radius: 20px;
  padding: 20px;
}

.list-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.list-heading p,
.detail-label,
.section-note,
.pixel-room p,
.host-note {
  margin: 0;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.swatch,
.pixel-agent {
  position: relative;
  flex-shrink: 0;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge,
.pill,
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(23, 31, 49, 0.95);
  border: 1px solid var(--line);
}

.badge.good,
.status-good {
  color: var(--green);
}

.badge.warn,
.status-warn {
  color: var(--yellow);
}

.badge.bad,
.status-bad {
  color: var(--red);
}

.meta-grid,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-top: 18px;
}

.meta-block,
.detail-block {
  min-height: 92px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(18, 24, 38, 0.9);
}

.detail-label {
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-value {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.detail-value strong {
  font-weight: 700;
}

.detail-list,
.run-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.detail-list code,
.run-line,
.path-item {
  font-size: 12px;
  color: var(--muted);
}

details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

.section-note {
  padding-top: 10px;
  color: var(--dim);
  font-size: 13px;
}

.lane-card {
  padding: 18px;
}

.lane-value {
  margin: 14px 0 0;
  color: var(--text);
  line-height: 1.6;
}

.pixel-host {
  padding: 18px;
}

.pixel-host + .pixel-host {
  margin-top: 4px;
}

.host-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.pixel-floor {
  padding-top: 18px;
}

.pixel-room {
  width: min(100%, 310px);
  padding: 16px;
  border-radius: 18px;
  border: 2px solid var(--line-strong);
  background:
    linear-gradient(0deg, rgba(52, 65, 95, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 65, 95, 0.25) 1px, transparent 1px),
    rgba(18, 24, 38, 0.92);
  background-size: 12px 12px;
}

.pixel-stage {
  padding: 12px 0;
  display: flex;
  gap: 14px;
  align-items: center;
}

.pixel-agent {
  width: 34px;
  height: 42px;
  border: 3px solid rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 -8px 0 rgba(0, 0, 0, 0.25),
    0 0 0 3px rgba(255, 255, 255, 0.08);
}

.pixel-agent::before,
.pixel-agent::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  background: rgba(255, 255, 255, 0.9);
}

.pixel-agent::before {
  top: 8px;
  height: 5px;
}

.pixel-agent::after {
  top: 20px;
  height: 4px;
  opacity: 0.55;
}

.pixel-desk {
  flex: 1;
  min-height: 64px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 16, 24, 0.92);
}

.pixel-desk strong {
  display: block;
  font-size: 12px;
}

.pixel-desk span {
  display: block;
  padding-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 1120px) {
  .summary-grid,
  .lane-grid,
  .meta-grid,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .data-card {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  body {
    padding: 14px;
  }

  .topbar,
  .toolbar,
  .list-heading,
  .host-header {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-grid,
  .lane-grid,
  .meta-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .search input,
  .select-wrap select {
    min-width: 0;
    width: 100%;
  }
}
