*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --mono: "SFMono-Regular", Consolas, monospace;
  --color-link: #0969da;
  --color-muted: #656d76;
  --color-border: #d0d7de;
  --color-surface: #f6f8fa;

  --text-xs:   12px;  /* badges, table headers, code, data labels */
  --text-sm:   13px;  /* secondary UI text */
  --text-base: 14px;  /* body, h3 */
  --text-md:   16px;  /* section headings, site title */
  --text-lg:   18px;  /* h2 */
  --text-xl:   22px;  /* h1 */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: var(--text-base);
  background: var(--color-surface);
  color: #24292f;
  line-height: 1.5;
}

/* ── Navigation ── */
.site-header {
  background: #24292f;
  padding: 0 24px;
  height: 48px;
  display: flex;
  align-items: center;
}
.site-nav { display: flex; align-items: center; gap: 16px; }
.site-title {
  color: #fff;
  font-weight: 600;
  font-size: var(--text-md);
  text-decoration: none;
}
.site-title:hover { color: #ccc; }

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 24px;
}
.container-wide { max-width: 1400px; }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--color-link); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Page headers ── */
h1 { font-size: var(--text-xl); font-weight: 600; margin-bottom: 4px; }
h2 { font-size: var(--text-lg); font-weight: 600; margin: 24px 0 12px; }
h3 { font-size: var(--text-base); font-weight: 600; margin-bottom: 8px; }

.run-header { margin-bottom: 24px; }
.run-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* ── Status badges ── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: capitalize;
}
.status-success  { background: #dafbe1; color: #1a7f37; }
.status-failure  { background: #ffebe9; color: #cf222e; }
.status-cancelled { background: var(--color-surface); color: var(--color-muted); border: 1px solid var(--color-border); }
.status-pending  { background: #fff8c5; color: #9a6700; }

/* ── External link ── */
.external-link { color: var(--color-link); text-decoration: none; font-size: var(--text-sm); }
.external-link:hover { text-decoration: underline; }

/* ── Card: shared bordered section ── */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-bottom: 24px;
  overflow: hidden;
}

/* ── Card heading: section title bar ── */
.card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-md);
  margin: 0;
}

/* ── Shared data table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  padding: 8px 16px;
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.data-table td {
  padding: 8px 16px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--color-surface); }

/* ── Landing page ── */
.run-date a { color: var(--color-link); text-decoration: none; font-weight: 500; }
.run-date a:hover { text-decoration: underline; }

/* ── Suite chips ── */
.suite-cells { display: flex; flex-wrap: wrap; gap: 8px; }
.suite-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: var(--text-xs);
}
.suite-name { font-weight: 600; }
.suite-counts { display: flex; gap: 4px; }
.count-success { color: #1a7f37; }
.count-failure { color: #cf222e; }
.count-pending { color: #9a6700; }

/* ── Matrix chips ── */
.matrix-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.matrix-chip {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: var(--text-xs);
}
.matrix-key { color: var(--color-muted); }
.matrix-val { color: #24292f; font-weight: 600; }

/* ── Run details ── */
.suite-summary { font-size: var(--text-sm); font-weight: 400; }
.jobs-table a { color: var(--color-link); text-decoration: none; }
.jobs-table a:hover { text-decoration: underline; }
.job-name { font-size: var(--text-sm); }
/* ── Job details ── */
.pod-section { padding: 16px; }
.pod-heading { margin-bottom: 12px; }

.events-details { margin-bottom: 12px; }
.events-details summary {
  cursor: pointer;
  color: var(--color-link);
  font-size: var(--text-sm);
  user-select: none;
  margin-bottom: 4px;
}
.events-details summary:hover { text-decoration: underline; }
.events-pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 12px;
  font-family: var(--mono);
  font-size: var(--text-xs);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 6px;
}

.container-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
}
.container-link {
  display: inline-block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 3px 10px;
  color: var(--color-link);
  text-decoration: none;
  font-family: var(--mono);
  font-size: var(--text-xs);
}
.container-link:hover { background: #e1e4e8; }

/* ── Test results ── */
.test-summary-counts { display: flex; gap: 10px; font-size: var(--text-sm); font-weight: 400; }
.test-name { font-family: var(--mono); font-size: var(--text-xs); }
.test-duration { color: var(--color-muted); font-size: var(--text-xs); }

/* ── Logs ── */
.log-pod { color: var(--color-muted); }
.log-sep { margin: 0 6px; color: var(--color-border); }
.log-container { color: #24292f; }

.log-pre {
  background: #24292f;
  color: #e6edf3;
  border-radius: 6px;
  padding: 20px;
  font-family: var(--mono);
  font-size: var(--text-xs);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  margin-top: 16px;
}
.log-line {
  display: block;
  padding-left: 2em;
  text-indent: -2em;
}

/* ── Misc ── */
.empty { color: var(--color-muted); font-style: italic; margin-top: 8px; }
