* { box-sizing: border-box; }
body {
  margin: 0; padding: 0;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Segoe UI", sans-serif;
  background: #0d1117; color: #e6edf3;
  line-height: 1.5;
}
header {
  background: #161b22;
  padding: 20px;
  border-bottom: 1px solid #30363d;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
h1 { margin: 0; font-size: 1.4rem; }
.meta { display: flex; gap: 12px; align-items: center; font-size: 0.85rem; color: #8b949e; }
button {
  background: #21262d; color: #e6edf3; border: 1px solid #30363d;
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
}
button:hover { background: #30363d; }

section.card {
  margin: 20px;
  padding: 20px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
}
section h2 { margin-top: 0; margin-bottom: 14px; font-size: 1.05rem; border-bottom: 1px solid #30363d; padding-bottom: 8px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.tile {
  padding: 14px;
  border-radius: 6px;
  background: #0d1117;
  border: 1px solid #30363d;
}
.tile .label { font-size: 0.8rem; color: #8b949e; }
.tile .value { font-size: 1.4rem; font-weight: 700; margin-top: 4px; }
.tile.ok { border-color: #2ea043; }
.tile.warn { border-color: #d29922; }
.tile.error { border-color: #f85149; }
.tile .pid { font-size: 0.8rem; color: #8b949e; margin-top: 6px; }
.tile .stale { font-size: 0.75rem; color: #d29922; margin-top: 4px; }

table {
  width: 100%; border-collapse: collapse;
}
th, td {
  padding: 8px 10px; text-align: left;
  border-bottom: 1px solid #30363d;
  font-size: 0.9rem;
}
th { color: #8b949e; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
td.status-ok { color: #3fb950; font-weight: 600; }
td.status-warn { color: #d29922; font-weight: 600; }
td.status-error { color: #f85149; font-weight: 600; }
td.snippet { color: #8b949e; font-family: monospace; font-size: 0.78rem; }

#next-post {
  margin-top: 12px;
  padding: 12px;
  background: #0d1117;
  border-radius: 6px;
  border: 1px solid #30363d;
  font-size: 0.9rem;
}
#errors .error-item {
  padding: 10px;
  margin-bottom: 8px;
  background: #0d1117;
  border-left: 3px solid #f85149;
  border-radius: 4px;
  font-size: 0.85rem;
}
#errors .error-item .source { color: #f85149; font-weight: 600; }
#errors .error-item .at { color: #8b949e; font-size: 0.78rem; }
#errors .error-item .snippet { font-family: monospace; color: #c9d1d9; margin-top: 4px; font-size: 0.78rem; }
#errors .empty { color: #3fb950; }

table.history th, table.history td { font-size: 0.78rem; padding: 6px 8px; }
table.history td:nth-child(1) { white-space: nowrap; color: #8b949e; }
table.history { font-family: monospace; }
