:root {
  --bg: #efece4;
  --paper: #f7f5f0;
  --ink: #1c1915;
  --muted: #6f685e;
  --line: #d8d1c4;
  --fail: #8d2c2c;
  --ok: #2d6848;
  --bar: #8d2c2c;
  --chip: #ebe6dc;
  color: var(--ink);
  background: var(--bg);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0 auto;
  max-width: 1120px;
  padding: 32px 28px 64px;
}

button, input {
  font: inherit;
  color: inherit;
}

h1, h2, h3, p { margin: 0; }

h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.kicker, .meta, .caption, .status-line {
  color: var(--muted);
  font-size: 13px;
}

.kicker {
  margin-bottom: 4px;
  font-family: "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.02em;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ranges {
  display: flex;
  border: 1px solid var(--line);
  background: var(--paper);
}

.ranges button, #refresh, .primary, .text-button, .recent-item {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ranges button {
  padding: 8px 12px;
  color: var(--muted);
}

.ranges button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

#refresh, .text-button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.primary {
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
}

button:disabled { opacity: 0.55; cursor: wait; }

main { padding-top: 28px; }

.hero {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: end;
  padding-bottom: 28px;
}

.total {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 84px;
  line-height: 0.85;
  letter-spacing: -0.06em;
  font-weight: 500;
}

.total.fail { color: var(--fail); }
.total.ok { color: var(--ok); }

.total-label {
  margin-top: 10px;
  font-size: 18px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.services { list-style: none; margin: 8px 0 0; padding: 0; }
.services li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.count {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 500;
}
.count.fail { color: var(--fail); }
.count.ok { color: var(--ok); }

.service-name { font-size: 18px; font-weight: 600; }
.bar {
  height: 6px;
  margin-top: 10px;
  background: var(--chip);
}
.bar span {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--bar);
}
.jobs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.jobs span {
  padding: 3px 8px;
  background: var(--chip);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
}

.section { margin-top: 36px; }
.section h2 { margin-bottom: 12px; }

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  padding: 0 8px 8px 0;
}
td {
  padding: 10px 12px 10px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
td.num, th.num { text-align: right; font-family: "IBM Plex Mono", Consolas, monospace; }
td.num { font-size: 16px; }

.chart {
  width: 100%;
  height: 160px;
  display: block;
}
.chart text { fill: var(--muted); font-size: 11px; font-family: "IBM Plex Mono", Consolas, monospace; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .bar-rect { fill: var(--fail); }

.recent { list-style: none; margin: 0; padding: 0; }
.recent-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.recent-item .when {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
}
.recent-item .who { font-weight: 600; margin: 2px 0; }
.recent-item .what { color: var(--ink); }
.recent-item .full {
  display: none;
  margin-top: 8px;
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
}
.recent-item.open .full { display: block; }

.connect, .banner {
  max-width: 640px;
  padding: 22px 0 8px;
}
.connect p, .banner p { margin-top: 8px; color: var(--muted); }
form { display: grid; gap: 12px; margin-top: 18px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.form-row { display: flex; gap: 10px; align-items: center; }
.error { color: var(--fail); font-size: 14px; }

details { margin-top: 28px; }
summary { cursor: pointer; color: var(--muted); }
pre {
  overflow: auto;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.quiet-head {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

html.embed,
body.embed {
  max-width: none;
  margin: 0;
  background: #0A1628;
  color: #e2e8f0;
  --bg: #0A1628;
  --paper: rgba(255, 255, 255, 0.03);
  --ink: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.28);
  --fail: #f87171;
  --ok: #34d399;
  --bar: #f87171;
  --chip: rgba(255, 255, 255, 0.06);
  font-family: "Segoe UI", sans-serif;
}

html.embed {
  scrollbar-width: thin;
  scrollbar-color: #3B82F6 transparent;
}

html.embed::-webkit-scrollbar {
  width: 6px;
}

html.embed::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

html.embed::-webkit-scrollbar-thumb {
  background-color: #3B82F6;
  border-radius: 3px;
}

html.embed::-webkit-scrollbar-thumb:hover {
  background-color: #60A5FA;
}

body.embed {
  padding: 20px 28px 48px 28px;
}

body.embed h1 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0;
  color: #fff;
}

body.embed .kicker {
  font-family: "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.embed .top {
  align-items: center;
  border-bottom-color: transparent;
  padding-bottom: 8px;
}

body.embed .ranges,
body.embed #refresh,
body.embed .primary {
  border-radius: 999px;
}

body.embed .ranges {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

body.embed .ranges button[aria-pressed="true"],
body.embed #refresh,
body.embed .primary {
  background: #3B82F6;
  color: #fff;
}

body.embed #refresh,
body.embed .primary {
  border-color: transparent;
}

body.embed .hero {
  align-items: stretch;
}

body.embed .stat-row {
  border-top: 0;
  align-items: stretch;
}

body.embed .stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

body.embed .services li,
body.embed .recent-item,
body.embed pre,
body.embed input {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

body.embed .services li {
  padding: 16px 18px;
  margin-top: 10px;
}

body.embed .recent-item {
  padding: 12px 14px;
  margin-top: 8px;
}

body.embed .jobs span {
  border-radius: 999px;
}

body.embed table {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

body.embed th,
body.embed td {
  padding-left: 12px;
}

body.embed .section h2 {
  color: #fff;
  font-weight: 500;
}

@media (max-width: 800px) {
  body { padding: 20px 16px 48px; }
  .top, .hero, .split, .services li { display: block; }
  .top-actions { margin-top: 16px; flex-wrap: wrap; }
  .total { font-size: 64px; }
  .stat-row { margin-top: 18px; }
  .count { margin-bottom: 6px; }
  .services li { padding: 14px 0; }
}
