:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: rgba(17, 21, 29, 0.92);
  --panel-strong: #141923;
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.15);
  --text: #f5f7fb;
  --muted: #8f98a8;
  --faint: #596170;
  --lime: #d6ff62;
  --lime-soft: rgba(214, 255, 98, 0.12);
  --cyan: #70e5ff;
  --orange: #ffad66;
  --red: #ff717d;
  --radius: 18px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 76% 4%, rgba(124, 255, 158, 0.08), transparent 29%),
    var(--bg);
  background-size: 40px 40px, 40px 40px, auto, auto;
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(110px);
  opacity: 0.11;
  pointer-events: none;
}

.ambient-a {
  top: 120px;
  left: -240px;
  background: #d6ff62;
}

.ambient-b {
  right: -240px;
  bottom: -120px;
  background: #476dff;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(8, 11, 16, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(214, 255, 98, 0.45);
  border-radius: 10px;
  background: var(--lime-soft);
  color: var(--lime);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.04em;
  transform: rotate(-3deg);
}

.brand > span:last-child {
  display: grid;
}

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

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.environment-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.environment-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px rgba(214, 255, 98, 0.7);
}

main {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 68px 0 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.6fr);
  gap: 80px;
  align-items: end;
  margin-bottom: 50px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 13px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(48px, 6.2vw, 92px);
  font-weight: 750;
  letter-spacing: -0.066em;
  line-height: 0.94;
}

h1 span {
  color: #737b89;
}

.hero-copy {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-aside {
  display: flex;
  align-items: center;
  gap: 21px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 20, 27, 0.75);
}

.pulse-orb {
  display: grid;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid rgba(214, 255, 98, 0.23);
  border-radius: 50%;
  background: rgba(214, 255, 98, 0.035);
}

.pulse-orb span {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow:
    0 0 24px rgba(214, 255, 98, 0.8),
    0 0 0 8px rgba(214, 255, 98, 0.08);
}

.hero-aside small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.15em;
}

.hero-aside strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
}

.hero-aside p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 20, 27, 0.72);
}

.metric-card {
  min-height: 128px;
  padding: 21px 24px;
  border-right: 1px solid var(--border);
}

.metric-card:last-child {
  border-right: 0;
}

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

.metric-card strong {
  display: block;
  margin: 10px 0 3px;
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.metric-card small {
  color: var(--faint);
  font-size: 10px;
}

.plugin-metric strong {
  color: var(--lime);
  font-size: 22px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(540px, 0.96fr) minmax(440px, 1.04fr);
  gap: 20px;
  align-items: start;
}

.left-column {
  display: grid;
  gap: 20px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
}

.composer-panel,
.runs-panel,
.inspector-panel {
  padding: 26px;
}

.panel-heading,
.inspector-header,
.subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading {
  margin-bottom: 24px;
}

.panel-heading h2,
.inspector-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.section-kicker {
  margin-bottom: 7px;
  font-size: 9px;
}

.version-tag,
.status-badge {
  padding: 6px 8px;
  border: 1px solid var(--border-bright);
  border-radius: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #c5cad4;
  font-size: 11px;
  font-weight: 650;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  background: #0c1016;
  color: var(--text);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(214, 255, 98, 0.35);
  box-shadow: 0 0 0 3px rgba(214, 255, 98, 0.06);
}

textarea {
  min-height: 134px;
  padding: 15px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.65;
}

input,
select {
  height: 44px;
  padding: 0 13px;
  font-size: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 0.62fr;
  gap: 14px;
  margin-top: 17px;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.composer-footer p {
  max-width: 330px;
  margin: 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  transition:
    transform 140ms ease,
    opacity 140ms ease,
    border-color 140ms ease;
}

.button:hover:not(.disabled) {
  transform: translateY(-1px);
}

.button:disabled,
.button.disabled {
  cursor: not-allowed;
  opacity: 0.4;
  pointer-events: none;
}

.button-primary {
  min-width: 178px;
  background: var(--lime);
  color: #11140d;
}

.button-primary b {
  font-size: 17px;
}

.button-secondary {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.button-ghost {
  min-height: 36px;
  border-color: var(--border);
  color: #d9dde5;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 18px;
}

.run-list {
  display: grid;
  gap: 9px;
}

.run-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  background: #0d1118;
  color: inherit;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.run-card:hover,
.run-card.selected {
  border-color: rgba(214, 255, 98, 0.22);
  background: rgba(214, 255, 98, 0.035);
}

.run-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--lime);
  font-size: 12px;
}

.run-copy {
  min-width: 0;
}

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

.run-copy strong {
  font-size: 12px;
}

.run-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.run-progress {
  display: grid;
  min-width: 58px;
  gap: 5px;
  justify-items: end;
}

.run-progress span {
  font-size: 10px;
  font-weight: 700;
}

.mini-track {
  width: 52px;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
}

.inspector-panel {
  position: sticky;
  top: 94px;
  min-height: 720px;
}

.inspector-empty {
  display: grid;
  min-height: 660px;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.empty-glyph {
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--lime);
  font-size: 32px;
}

.inspector-empty h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.inspector-empty p {
  max-width: 300px;
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.status-badge[data-status="succeeded"] {
  border-color: rgba(214, 255, 98, 0.28);
  background: var(--lime-soft);
  color: var(--lime);
}

.status-badge[data-status="running"],
.status-badge[data-status="queued"] {
  border-color: rgba(112, 229, 255, 0.25);
  background: rgba(112, 229, 255, 0.08);
  color: var(--cyan);
}

.status-badge[data-status="failed"] {
  border-color: rgba(255, 113, 125, 0.25);
  background: rgba(255, 113, 125, 0.08);
  color: var(--red);
}

.detail-prompt {
  margin: 20px 0;
  padding: 14px;
  border-left: 2px solid var(--lime);
  background: rgba(255, 255, 255, 0.025);
  color: #c2c8d2;
  font-size: 12px;
  font-style: italic;
  line-height: 1.6;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 15px 0;
  border-block: 1px solid var(--border);
}

.detail-meta div {
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.detail-meta div:first-child {
  padding-left: 0;
  border-left: 0;
}

.detail-meta small,
.detail-meta strong {
  display: block;
}

.detail-meta small {
  margin-bottom: 6px;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.detail-meta strong {
  font-size: 12px;
}

.inspector-section {
  margin-top: 27px;
}

.subheading {
  margin-bottom: 12px;
}

.subheading h3 {
  margin: 0;
  font-size: 12px;
}

.subheading span {
  color: var(--faint);
  font-size: 9px;
}

.stage-list {
  display: grid;
}

.stage-row {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 11px;
  min-height: 50px;
  align-items: start;
}

.stage-row:not(:last-child)::before {
  position: absolute;
  top: 23px;
  bottom: -3px;
  left: 7px;
  width: 1px;
  background: var(--border);
  content: "";
}

.stage-dot {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  border: 3px solid #11161e;
  border-radius: 50%;
  background: #596170;
  box-shadow: 0 0 0 1px var(--border-bright);
}

.stage-row[data-status="succeeded"] .stage-dot {
  background: var(--lime);
}

.stage-row[data-status="running"] .stage-dot {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(112, 229, 255, 0.5);
}

.stage-row[data-status="failed"] .stage-dot {
  background: var(--red);
}

.stage-copy strong {
  display: block;
  font-size: 11px;
}

.stage-copy small {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 9px;
}

.stage-state {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.coverage-list {
  display: grid;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.coverage-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.82fr) 72px minmax(150px, 1.18fr);
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
}

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

.coverage-row strong {
  font-size: 10px;
}

.coverage-row p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.coverage-state {
  justify-self: start;
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.coverage-state.included {
  background: var(--lime-soft);
  color: var(--lime);
}

.coverage-state.deferred {
  background: rgba(255, 173, 102, 0.1);
  color: var(--orange);
}

.coverage-state.excluded {
  background: rgba(255, 255, 255, 0.05);
  color: #777f8c;
}

.artifact-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 22px;
  padding: 15px;
  border: 1px solid rgba(214, 255, 98, 0.16);
  border-radius: 12px;
  background: rgba(214, 255, 98, 0.035);
}

.artifact-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.empty-state {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: var(--faint);
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  max-width: 380px;
  padding: 13px 16px;
  border: 1px solid var(--border-bright);
  border-radius: 11px;
  background: #151a22;
  color: var(--text);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(255, 113, 125, 0.3);
}

.hidden {
  display: none !important;
}

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-aside {
    max-width: 460px;
  }

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

  .inspector-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding-inline: 16px;
  }

  .environment-pill {
    display: none;
  }

  main {
    width: min(100% - 28px, 1440px);
    padding-top: 42px;
  }

  h1 {
    font-size: 48px;
  }

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

  .metric-card:nth-child(2) {
    border-right: 0;
  }

  .metric-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .composer-panel,
  .runs-panel,
  .inspector-panel {
    padding: 19px;
  }

  .form-row,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .detail-meta {
    gap: 13px;
  }

  .detail-meta div {
    padding: 0;
    border: 0;
  }

  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .coverage-row {
    grid-template-columns: 1fr auto;
  }

  .coverage-row p {
    grid-column: 1 / -1;
  }
}
