:root {
  font-family: system-ui, sans-serif;
  line-height: 1.45;
  color: #1a1a1a;
  background: #f4f4f5;
}
body {
  margin: 0 auto;
  max-width: 56rem;
  padding: 1rem 1.25rem 3rem;
}
a {
  color: #0b57d0;
}
header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.85rem;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.server-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
}
.brand-sub {
  font-size: 0.95rem;
  color: #64748b;
  font-weight: 500;
}
header nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.intro {
  font-size: 0.95rem;
  color: #334155;
  background: #fff;
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}
.intro code {
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.form-hint {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  max-width: 40rem;
}
.chart-wrap {
  position: relative;
  height: 220px;
  max-width: 360px;
  margin-top: 0.75rem;
}
.chart-wrap-wide {
  position: relative;
  height: 260px;
  width: 100%;
  max-width: 100%;
  margin-top: 0.75rem;
}
.server-pop h2 {
  margin-top: 0;
}
.poll {
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.poll h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.meta {
  font-size: 0.9rem;
  color: #555;
  margin: 0 0 0.75rem;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-live {
  background: #dcfce7;
  color: #166534;
}
.badge-ended {
  background: #f3f4f6;
  color: #4b5563;
}
.badge-upcoming {
  background: #dbeafe;
  color: #1e40af;
}
.badge-active {
  background: #fef3c7;
  color: #92400e;
}
canvas {
  display: block;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  border: 1px solid #e5e7eb;
  padding: 0.4rem 0.5rem;
  text-align: left;
}
th {
  background: #f9fafb;
}
form.inline {
  display: inline;
}
button,
.btn {
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 0.9rem;
}
button.primary {
  background: #0b57d0;
  color: #fff;
  border-color: #0b57d0;
}
button.danger {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}
label {
  display: block;
  margin: 0.75rem 0 0.25rem;
  font-weight: 500;
}
input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  max-width: 40rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}
textarea {
  min-height: 6rem;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}
.error {
  color: #b91c1c;
  font-weight: 500;
}
.success {
  color: #166534;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.stack.tight {
  gap: 0.35rem;
}
.stack.tight dt {
  margin: 0;
  font-weight: 600;
  font-size: 0.85rem;
}
.stack.tight dd {
  margin: 0 0 0.5rem;
}
.muted {
  color: #64748b;
  font-size: 0.9rem;
}
.muted.small {
  font-size: 0.82rem;
}
.inline-row {
  display: inline-block;
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
}
button.secondary {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  max-width: 40rem;
}
.check-row input {
  margin-top: 0.25rem;
  flex-shrink: 0;
}
.restart-confirm button.danger {
  align-self: flex-start;
}
