:root {
  --bg: #071018;
  --bg-soft: #0d1b2a;
  --panel: #112638;
  --panel-hi: #1b344a;
  --text: #e6edf3;
  --muted: #9db1c2;
  --accent: #2fd1ff;
  --accent-2: #ff9f59;
  --border: #2a475e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% -20%, #153049 0%, var(--bg) 52%);
  position: relative;
  padding: 24px;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(50px);
  pointer-events: none;
  opacity: 0.35;
}

.bg-orb-a {
  width: 300px;
  height: 300px;
  right: -60px;
  top: 40px;
  background: var(--accent);
}

.bg-orb-b {
  width: 260px;
  height: 260px;
  left: -80px;
  bottom: -50px;
  background: var(--accent-2);
}

.site-header {
  max-width: 1100px;
  margin: 0 auto 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.header-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

h1 {
  margin: 0 0 4px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.brand-subtext {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(10, 26, 39, 0.75);
}

.tabs {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(14, 33, 48, 0.9);
  color: var(--muted);
  border-radius: 12px 12px 0 0;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tab.is-active {
  color: var(--text);
  background: var(--panel-hi);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 0 14px 14px 14px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  overflow: hidden;
}

.panel {
  display: none;
  padding: 22px;
}

.panel.is-active {
  display: block;
}

.header-image {
  --header-image-h: 80px;
  --header-image-ar: 1.5;
  margin: 0;
  height: var(--header-image-h);
  width: calc(var(--header-image-h) * var(--header-image-ar));
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  position: relative;
  background: #101f2d;
  flex: 0 0 calc(var(--header-image-h) * var(--header-image-ar));
}

.header-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 50, 74, 0.36), rgba(8, 18, 29, 0.2));
  pointer-events: none;
}

.header-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: sepia(0.3) saturate(1.2) hue-rotate(162deg) brightness(0.9);
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 32px);
}

h3 {
  margin: 20px 0 10px;
}

p,
li,
.status,
.footnote {
  color: var(--muted);
  line-height: 1.45;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.metrics article {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(7, 20, 31, 0.55);
}

.metrics .big {
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
  font-size: 24px;
  margin: 4px 0;
}

.markdown-body {
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: rgba(8, 19, 30, 0.65);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin-top: 1.1em;
}

.markdown-body > h1:first-child,
.markdown-body > h2:first-child,
.markdown-body > h3:first-child {
  margin-top: 0;
}

.markdown-body code,
code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.93em;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 6px;
}

.markdown-body pre {
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.06);
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.detail-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.detail-controls label {
  color: var(--muted);
  font-size: 14px;
}

.detail-controls select,
.detail-controls input {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(7, 20, 31, 0.55);
  color: var(--text);
  padding: 7px 10px;
  font: inherit;
}

#detail-filter {
  min-width: 260px;
  flex: 1 1 260px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

th.sortable::after {
  content: " \2195";
  color: var(--muted);
  font-size: 12px;
}

th.sortable.is-sort-asc::after {
  content: " \2191";
  color: var(--accent);
}

th.sortable.is-sort-desc::after {
  content: " \2193";
  color: var(--accent);
}

#detail-table td:first-child {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  max-width: 520px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-failed td {
  color: #ffc2b0;
}

.status {
  font-weight: 600;
}

.status a {
  color: var(--accent);
}

.footnote a {
  color: var(--accent);
}

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

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

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

}
