:root {
  color-scheme: dark;
  --background: #0b0d10;
  --surface: #14171b;
  --surface-strong: #1a1e23;
  --line: #30363d;
  --text: #f4f7fa;
  --muted: #98a2ad;
  --green: #58d68d;
  --amber: #f2c14e;
  --blue: #66a3ff;
}

* { box-sizing: border-box; }
html { background: var(--background); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.topbar {
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: var(--text);
  object-fit: cover;
}
.brand strong,
.brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 12px; }

.network-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}
.state-dot.live { background: var(--green); }
.state-dot.error { background: #ff6b6b; }

main {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 52px 0 36px;
}

.overview {
  min-height: 250px;
  padding-bottom: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: end;
  gap: 48px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}
h1 {
  margin: 0;
  font-size: 88px;
  line-height: .98;
  letter-spacing: 0;
}
.route { margin: 16px 0 0; color: var(--muted); }
.project-summary {
  max-width: 620px;
  margin: 10px 0 0;
  color: #cbd4de;
  font-size: 14px;
  line-height: 1.5;
}
.identity {
  margin: 0;
  border-top: 1px solid var(--line);
}
.identity div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.identity dt { color: var(--muted); }
.identity dd { margin: 0; text-align: right; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  min-width: 0;
  min-height: 120px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.metric:nth-child(2) { border-top-color: var(--blue); }
.metric:nth-child(3) { border-top-color: var(--green); }
.metric:nth-child(4) { border-top-color: var(--amber); }
.metric p { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.metric strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 21px;
  line-height: 1.2;
}

.details-band {
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}
code { color: #cbd4de; overflow-wrap: anywhere; }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
nav a { color: var(--text); text-underline-offset: 4px; }
nav a:hover { color: var(--green); }

footer {
  padding: 20px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 820px) {
  h1 { font-size: 64px; }
  .overview { grid-template-columns: 1fr; align-items: start; gap: 36px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .details-band { display: block; }
  nav { margin-top: 24px; justify-content: flex-start; }
}

@media (max-width: 520px) {
  h1 { font-size: 44px; }
  .topbar { padding: 0 16px; }
  main { width: min(100% - 32px, 1160px); padding-top: 36px; }
  .metric-grid { grid-template-columns: 1fr; }
  .overview { min-height: 0; }
  footer { display: block; }
  footer span { display: block; margin-bottom: 8px; }
}
