@font-face {
  font-family: "IBM Plex Serif";
  src: url("/fonts/IBMPlexSerif-Regular.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("/fonts/IBMPlexSerif-Medium.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("/fonts/IBMPlexSerif-SemiBold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("/fonts/IBMPlexSerif-Bold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-SemiBold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

:root {
  color-scheme: dark;
  --background: #0e0e10;
  --foreground: #fafaf7;
  --foreground-soft: rgba(250, 250, 247, 0.72);
  --muted: rgba(250, 250, 247, 0.5);
  --muted-foreground: rgba(250, 250, 247, 0.62);
  --subtle: rgba(250, 250, 247, 0.32);
  --border: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(255, 255, 255, 0.03);
  --card: #16161a;
  --card-raised: #1a1a1e;
  --fill: #232328;
  --fill-strong: #2b2b31;
  --primary: #fafaf7;
  --primary-foreground: #0a0a0b;
  --success: #7ee2a8;
  --danger: #f2b3a7;
  --book-paper: #e8dfcb;
  --book-ink: #1a1610;
  --chart-1: #e8dfcb;
  --chart-2: #7ee2a8;
  --chart-3: #d9b36c;
  --chart-4: #b8a8ff;
  --chart-5: #f2b3a7;
  --shadow-sm: 0 0 0 0.5px rgba(255, 255, 255, 0.04), 0 1px 2px rgba(0, 0, 0, 0.45), inset 0 0.5px 0 rgba(255, 255, 255, 0.05);
  --shadow-card: 0 0 0 0.5px rgba(255, 255, 255, 0.05), 0 2px 8px -1px rgba(0, 0, 0, 0.5), inset 0 0.5px 0 rgba(255, 255, 255, 0.06);
  --font-ui: "IBM Plex Serif", "New York", Georgia, serif;
  --font-serif: "IBM Plex Serif", "New York", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
  font-family: var(--font-serif);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-serif);
}

main {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero,
.hero-copy,
.metric-grid,
.dashboard,
.panel-head,
.chart-head,
.legend,
.status,
.metric span,
.meter div,
.endpoint {
  display: flex;
}

.hero {
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 20px;
}

.hero-copy {
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--book-paper);
  color: var(--book-ink);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
  flex: 0 0 auto;
}

.subtle,
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.subtle {
  margin-top: 8px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  font-family: var(--font-mono);
  letter-spacing: 0;
  text-transform: uppercase;
}

.status {
  align-items: center;
  gap: 8px;
  height: 36px;
  border-radius: 999px;
  background: var(--card-raised);
  padding: 0 13px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.status.ok {
  color: var(--success);
}

.status.bad {
  color: var(--danger);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric,
.panel {
  border: 0;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.metric {
  min-height: 118px;
  padding: 15px;
}

.metric span,
.panel-head > span,
.endpoint > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--book-paper);
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
  line-height: 0;
}

.metric svg,
.panel-head svg,
.endpoint svg,
.status svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.75;
  vector-effect: non-scaling-stroke;
}

.status svg {
  width: 16px;
  height: 16px;
}

.metric p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}

.metric em {
  display: block;
  margin-top: 7px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.dashboard {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.86fr 0.9fr;
  gap: 12px;
  align-items: stretch;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.chart-card {
  min-height: 332px;
}

.chart-head,
.panel-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.legend {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.chart {
  width: 100%;
  height: 230px;
  display: block;
}

.chart line {
  stroke: var(--border-soft);
  stroke-width: 1;
}

.chart polyline {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart text {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.chart-empty {
  height: 230px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 13px;
}

.endpoint em {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  font-style: normal;
  overflow-wrap: anywhere;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--muted);
  flex: 0 0 auto;
}

.dot.on {
  background: var(--success);
}

.meter {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.meter div {
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.meter i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fill-strong);
}

.meter i span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.endpoint {
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-top: 1px solid var(--border);
}

.endpoint:first-of-type {
  border-top: 0;
}

.endpoint > span {
  width: 32px;
  height: 32px;
}

.endpoint > span svg {
  width: 15px;
  height: 15px;
}

.endpoint p {
  width: 104px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.endpoint a {
  min-width: 0;
  color: var(--primary);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.kv {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.kv div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
}

dd {
  margin: 0;
  min-width: 0;
  color: var(--foreground);
  font-size: 12px;
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 780px) {
  main {
    width: min(100vw - 24px, 680px);
    padding-top: 22px;
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-copy {
    align-items: flex-start;
  }

  .metric-grid,
  .dashboard {
    grid-template-columns: 1fr;
  }
}
