:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #1e2732;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
.target-bar a {
  border: 1px solid #1e2732;
  border-radius: 6px;
  background: #1e2732;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
}

button:hover,
.target-bar a:hover {
  background: #101820;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 26px;
}

.topbar {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.eyebrow {
  color: #607080;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 36px;
  line-height: 1.1;
  margin-bottom: 8px;
}

h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

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

.lede {
  color: #526170;
  line-height: 1.45;
  margin-bottom: 0;
  max-width: 720px;
}

.target-bar {
  align-items: center;
  background: #fff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  margin-bottom: 14px;
  padding: 10px;
}

.target-bar label {
  color: #526170;
  font-size: 13px;
  font-weight: 700;
}

.target-bar input {
  border: 1px solid #ccd5df;
  border-radius: 6px;
  color: #1e2732;
  font: inherit;
  min-height: 40px;
  min-width: 0;
  padding: 0 10px;
}

.status-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 2fr 1fr 1fr;
  margin-bottom: 12px;
}

.status-grid article,
.metrics article,
.panel,
.card {
  background: #fff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
}

.status-grid article {
  min-width: 0;
  padding: 14px;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.metrics article {
  border-left: 4px solid #a7b1bd;
  padding: 12px 14px;
}

.metrics article[data-status="pass"] {
  border-left-color: #2b8a5f;
}

.metrics article[data-status="degraded"] {
  border-left-color: #c98b13;
}

.metrics article[data-status="fail"] {
  border-left-color: #c92a2a;
}

.metrics article[data-status="blocked"] {
  border-left-color: #5c4fc4;
}

.metrics span {
  color: #667789;
  display: block;
  font-size: 13px;
}

.metrics strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  margin-top: 4px;
}

.status-grid span,
.panel-head p,
.meta {
  color: #667789;
  font-size: 13px;
}

.status-grid strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.panel {
  margin-top: 16px;
  padding: 16px;
}

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

.filters {
  display: flex;
  gap: 8px;
}

.filter {
  background: #fff;
  border-color: #ccd5df;
  color: #1e2732;
  min-height: 34px;
  padding: 0 12px;
}

.filter.is-active {
  background: #1e2732;
  border-color: #1e2732;
  color: #fff;
}

.cards {
  display: grid;
  gap: 10px;
}

.card {
  padding: 14px;
}

.card:hover {
  border-color: #b9c6d4;
}

.card-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.summary {
  margin-bottom: 0;
}

.details {
  color: #607080;
  font-size: 13px;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 8px;
  text-transform: uppercase;
}

.badge[data-status="pass"] {
  background: #dff6ea;
  color: #146c43;
}

.badge[data-status="degraded"] {
  background: #fff1c6;
  color: #8a5a00;
}

.badge[data-status="fail"] {
  background: #ffe0e0;
  color: #9b1c1c;
}

.badge[data-status="blocked"] {
  background: #e7e4ff;
  color: #4b3b9f;
}

.badge[data-status="unknown"] {
  background: #edf1f5;
  color: #526170;
}

pre {
  background: #111827;
  border-radius: 8px;
  color: #f8fafc;
  margin: 0;
  max-height: 520px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #8fb7ff;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .shell {
    padding: 18px;
  }

  .topbar,
  .panel-head {
    display: block;
  }

  .actions {
    justify-content: stretch;
    margin-top: 14px;
  }

  .actions button {
    flex: 1;
  }

  .target-bar,
  .status-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .filters {
    margin-top: 12px;
    overflow-x: auto;
  }
}
