:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --live: #16a34a;
  --dev: #d97706;
  --archived: #9ca3af;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --card: #1a1d21;
    --text: #e8eaed;
    --muted: #9aa0a6;
    --border: #2a2e33;
    --accent: #60a5fa;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 1080px;
  padding: 32px 16px 64px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Segoe UI", sans-serif;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

h1 { margin: 0; font-size: 24px; font-weight: 700; }

#q {
  flex: 0 1 280px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}
#q:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filters button {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.filters button[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

section { margin-bottom: 28px; }
section h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.card:hover, .card:focus-visible { border-color: var(--accent); transform: translateY(-1px); outline: none; }
.card.archived { opacity: .55; }

.icon { font-size: 24px; line-height: 1; flex: none; }
.body { min-width: 0; }
.name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.desc { margin: 2px 0 4px; color: var(--muted); font-size: 13px; }
.host { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.live { background: var(--live); }
.dot.dev { background: var(--dev); }
.dot.archived { background: var(--archived); }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

@media (max-width: 600px) {
  #q { flex-basis: 100%; }
}
