:root {
  --bg: #0a0a0a;
  --panel: #101010;
  --fg: #d4d4d4;
  --dim: #5f5f5f;
  --faint: #3a3a3a;
  --green: #22c55e;
  --amber: #eab308;
  --border: #1c1c1c;
}

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

html { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

main {
  margin: auto;
  width: 100%;
  max-width: 640px;
  padding: 56px 24px 40px;
}

/* ---------- header ---------- */

.hostline {
  color: var(--green);
  font-size: 12px;
  letter-spacing: 0.04em;
}

h1 {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2px;
}

.cursor {
  color: var(--green);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.sub {
  color: var(--dim);
  font-size: 12px;
  margin-top: 2px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

/* ---------- sections ---------- */

section { margin-top: 26px; }

.comment {
  color: var(--faint);
  font-size: 11.5px;
  margin-bottom: 8px;
}

/* ---------- endpoint table ---------- */

.table {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  overflow: hidden;
}

.trow {
  display: grid;
  grid-template-columns: 104px 1fr auto 64px;
  gap: 12px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

.trow:last-child { border-bottom: none; }

.thead {
  color: var(--faint);
  font-size: 11px;
  text-transform: lowercase;
  background: #0d0d0d;
}

.c-endpoint {
  overflow-wrap: anywhere;
  color: var(--fg);
}

.c-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--dim);
  white-space: nowrap;
}

.c-latency {
  text-align: right;
  color: var(--dim);
  font-size: 12.5px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.dot.ok   { background: var(--green); box-shadow: 0 0 7px rgba(34,197,94,.55); }
.dot.warn { background: var(--amber); box-shadow: 0 0 7px rgba(234,179,8,.5); }

/* ---------- usage ---------- */

.usage {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  padding: 16px 14px;
}

.big { display: flex; align-items: baseline; gap: 10px; }

.big .val {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.big .unit { color: var(--dim); font-size: 12.5px; }

.bar {
  margin-top: 12px;
  height: 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #0d0d0d;
  overflow: hidden;
}

.fill {
  display: block;
  height: 100%;
  width: 40%;
  background: repeating-linear-gradient(
    -45deg,
    var(--green) 0 6px,
    #16a34a 6px 12px
  );
}

.breakdown {
  margin-top: 14px;
  display: grid;
  gap: 0;
}

.breakdown > div {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  padding: 6px 2px;
  border-bottom: 1px dashed var(--border);
}

.breakdown > div:last-child { border-bottom: none; }

.breakdown dt { color: var(--dim); }
.breakdown dd { color: var(--fg); }

/* ---------- notes ---------- */

.notes { list-style: none; }

.notes li { padding: 5px 2px; color: var(--dim); }

.notes li::before { content: "- "; color: var(--faint); }

/* ---------- footer ---------- */

footer {
  margin-top: 34px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 11.5px;
}

/* ---------- small screens ---------- */

@media (max-width: 480px) {
  main { padding: 40px 16px 32px; }
  h1 { font-size: 20px; }
  .trow { grid-template-columns: 84px 1fr auto 56px; gap: 8px; }
  .big .val { font-size: 24px; }
  .breakdown > div { grid-template-columns: 104px 1fr; }
}
