:root,
[data-theme="light"] {
  --chart-ink: #1a1a1a;
  --chart-fill: #d0d0d0;
  --chart-grid: #e6e6e6;
  --card-bg: #ffffff;
  --card-border: #e0e0e0;
}
[data-theme="dark"] {
  --chart-ink: #ededed;
  --chart-fill: #3a3a3a;
  --chart-grid: #262626;
  --card-bg: #1c1c1c;
  --card-border: #2a2a2a;
}

.back {
  margin: 0 0 24px;
  font-size: 0.9rem;
}
.back a {
  color: var(--muted);
  text-decoration-color: var(--line);
}

.hero {
  margin: 0 auto 8px;
  max-width: 50%;
}
.hero a {
  display: block;
  text-decoration: none;
  border: none;
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(100%);
  border: 1px solid var(--line);
  transition: filter 0.25s ease, opacity 0.15s ease;
}
.hero a:hover img {
  filter: grayscale(0%);
  opacity: 0.95;
}
@media (max-width: 720px) {
  .hero {
    max-width: 100%;
  }
}

.stats-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 18px;
}
.hostname {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0 0 40px;
}
.stat-card {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
  min-height: 150px;
}
.stat-card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
}
.sparkline {
  width: 100%;
  height: 60px;
  display: block;
}
.sparkline .fill {
  fill: var(--chart-fill);
  opacity: 0.7;
}
.sparkline .line {
  fill: none;
  stroke: var(--chart-ink);
  stroke-width: 1.25;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.sparkline .line.alt {
  stroke-dasharray: 3 3;
  opacity: 0.75;
}
.stat-foot {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0 0;
}
.bar-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.bar-track {
  height: 6px;
  background: var(--chart-grid);
  position: relative;
}
.bar-fill {
  height: 100%;
  background: var(--chart-ink);
}

.hw-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.hw-list li {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.hw-list li:last-child {
  border-bottom: none;
}
.hw-list strong {
  font-weight: 400;
  font-size: 1rem;
}
.hw-list span {
  color: var(--muted);
}

@media (max-width: 720px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .hw-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
