:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d7dde5;
  --accent: #1f6feb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 24px;
}

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

.search {
  flex: 0 1 280px;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.search input:focus {
  outline: 2px solid rgba(31, 111, 235, 0.25);
  border-color: var(--accent);
}

.content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.group {
  margin-bottom: 36px;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.group h2 {
  position: relative;
  margin: 0;
  padding-left: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.group h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
}

.group-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 18px;
}

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

.tool-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(31, 111, 235, 0.12);
  transform: translateY(-2px);
}

.tool-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.tool-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e8f6f0;
  color: #0f7b5f;
  font-size: 12px;
}

.empty-tip {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .search {
    flex: 1 1 auto;
  }

  .content {
    padding: 20px 16px 36px;
  }
}
