/* hd2sm public site. No scripts; light and dark follow the visitor's system. */
:root {
  --bg: #f6f5f1;
  --panel: #ffffff;
  --text: #1d1f21;
  --muted: #6a6f75;
  --line: #dcdad2;
  --accent: #2f5d8a;
  --ok: #1f7a3f;
  --warn: #a35c00;
  --bad: #b3261e;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --panel: #1d2024;
    --text: #e6e4de;
    --muted: #9aa0a6;
    --line: #2e3238;
    --accent: #8ab4e8;
    --ok: #6fcf8e;
    --warn: #f0b45c;
    --bad: #ff8a80;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
main { max-width: 64rem; margin: 0 auto; padding: 1rem; }
.top { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); background: var(--panel); }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; }
.top a { color: var(--text); text-decoration: none; font-weight: 600; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.05rem; }
.logo { height: 2.5rem; width: auto; max-width: 12rem; object-fit: contain; }
.tagline { color: var(--muted); font-size: 0.92rem; }
.banner { display: block; width: 100%; max-height: 14rem; object-fit: cover; border-radius: 10px; margin: 0.5rem 0 0.25rem; }
.foot { max-width: 64rem; margin: 2rem auto; padding: 0 1rem; color: var(--muted); font-size: 0.85rem; }
.foot p { margin: 0 0 0.4rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
h1 { font-size: 1.5rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
.lead { font-size: 1.05rem; }
.cards { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.card {
  display: block;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}
.card:hover { border-color: var(--accent); }
.row { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.name { font-size: 1.05rem; }
.detail, .muted, .hint, .empty { color: var(--muted); }
.detail { font-size: 0.92rem; }
.hint { font-size: 0.85rem; }
.count { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.mono, .address { font-family: ui-monospace, Consolas, monospace; }
.badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--muted);
}
.status { font-size: 0.85rem; font-weight: 600; }
.status.online { color: var(--ok); }
.status.starting, .status.not-answering { color: var(--warn); }
.status.offline { color: var(--bad); }
h1 .status { font-size: 0.9rem; vertical-align: middle; margin-left: 0.4rem; }
.columns { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.rotation { padding-left: 1.4rem; margin: 0; }
.rotation .current { font-weight: 600; }
.rules { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1rem; margin: 0; }
.rules dt { color: var(--muted); }
.rules dd { margin: 0; }
.sha { font-size: 0.75rem; word-break: break-all; }
.chart { width: 100%; height: 5rem; color: var(--accent); border-bottom: 1px solid var(--line); }
.actions { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.actions form { padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.actions .hint { margin: 0.4rem 0 0; }
button {
  font: inherit;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--panel);
  cursor: pointer;
}
button:disabled { background: transparent; color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.notice { padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-left-width: 4px; border-radius: 6px; background: var(--panel); }
.notice.ok { border-left-color: var(--ok); }
.notice.warn { border-left-color: var(--warn); }
.notice.bad { border-left-color: var(--bad); }
.badge.maintenance { border-color: var(--warn); color: var(--warn); }
