:root {
  color-scheme: light dark;
  --bg: #f6f4ec;
  --fg: #1f2328;
  --muted: #5a6472;
  --line: #d7d1c4;
  --accent: #0f6a5b;
  --code-bg: rgba(0, 0, 0, 0.06);
  --surface: #faf8f2;
  --surface-alt: #edeae0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --fg: #d4d7dc;
    --muted: #8b929e;
    --line: #2a2e35;
    --accent: #3dbda8;
    --code-bg: rgba(255, 255, 255, 0.07);
    --surface: #1a1d22;
    --surface-alt: #1a1d22;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    14px/1.5 "SFMono-Regular",
    "Cascadia Mono",
    "Liberation Mono",
    Menlo,
    monospace;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

main.wide {
  max-width: 1100px;
}

h1 {
  margin: 0 0 8px;
  font-size: 20px;
}

h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 24px 0 10px;
}

h3 {
  color: var(--muted);
  margin: 12px 0 4px;
  font-weight: 500;
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  background: var(--code-bg);
  padding: 2px 5px;
  border-radius: 3px;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

.muted {
  color: var(--muted);
}

.meta {
  margin-top: 6px;
  color: var(--muted);
}

header {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

section {
  margin-bottom: 28px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.info-table {
  width: auto;
}

.info-table td {
  border: 0;
  padding: 3px 16px 3px 0;
}

.info-label {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  width: 1%;
}

.server-list {
  margin: 4px 0;
  padding-left: 20px;
  list-style: disc;
}

.server-list li {
  padding: 2px 0;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

.none {
  color: var(--muted);
}

.raw-json {
  margin: 10px 0 0;
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

details summary {
  cursor: pointer;
  user-select: none;
}

details summary h2 {
  display: inline;
  margin: 0;
  border: 0;
  padding: 0;
}

footer {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.site-card {
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: 4px;
  background: var(--surface);
  transition: border-color 0.15s;
}

.site-card:hover {
  border-color: var(--accent);
}

.site-card a {
  font-weight: 600;
}

.site-meta {
  margin-top: 4px;
  color: var(--muted);
}

.site-description {
  margin-top: 6px;
  color: var(--fg);
}

.empty-state {
  color: var(--muted);
  font-style: italic;
  padding: 24px 0;
}

@media (max-width: 820px) {
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  td {
    padding: 2px 0;
    border: 0;
  }

  td::before {
    content: attr(data-label) " ";
    color: var(--muted);
  }
}
