:root {
  color-scheme: light;
  --ink: #1f252b;
  --muted: #66727c;
  --line: #d8dfda;
  --field: #f7faf8;
  --green: #286246;
  --yellow: #f4c534;
  --red: #d71946;
  --white: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #eef3ee;
}

a {
  color: var(--green);
  font-weight: 800;
}

.telemetry-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 6px 0 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
}

h2 {
  font-size: 1.35rem;
}

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

.top-actions a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 9px 12px;
  text-decoration: none;
}

.referral-panel,
.table-panel,
.metric-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.referral-panel {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding: 18px;
}

.referral-panel span,
.metric-grid span,
.section-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

code {
  display: block;
  overflow-x: auto;
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  background: var(--field);
  padding: 12px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 760;
}

.referral-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 720;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.metric-grid article {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.metric-grid strong {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.95;
}

.table-panel {
  margin-top: 18px;
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

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

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: var(--white);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

th {
  background: var(--field);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  font-weight: 650;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .topbar,
  .section-heading {
    display: block;
  }

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

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }
}

