/* GitHub Radar 样式:简洁 Feed 页面，突出仓库内容和判断理由。 */
:root {
  color-scheme: light;
  --bg: #f7f7f3;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f1f5f9;
  --green: #147d45;
  --blue: #2557d6;
  --orange: #b45309;
  --shadow: 0 18px 55px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 87, 214, 0.08), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 28px 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: #111827;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 27px;
  line-height: 1.1;
}

.meta,
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 13px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 30px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.hero h2 {
  margin-bottom: 8px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.05em;
}

.hero p {
  color: var(--muted);
  line-height: 1.7;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.metric strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.group {
  margin-bottom: 28px;
}

.group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 18px;
}

.count {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e5e7eb;
  color: var(--muted);
  font-size: 12px;
}

.card {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 35px rgba(17, 24, 39, 0.04);
}

.repo-head {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--soft);
}

.repo-name {
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.description {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 14px 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #374151;
  line-height: 1.55;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
}

.card-body {
  display: grid;
  gap: 12px;
}

.label {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: #e8f7ed;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.copy-block {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  color: #1f2937;
  line-height: 1.65;
}

.copy-block dt {
  color: var(--muted);
  font-weight: 800;
}

.copy-block dd {
  margin: 0;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic {
  border-radius: 999px;
  background: #eef2ff;
  color: var(--blue);
  padding: 5px 9px;
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
}

button,
.open-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
}

button.active {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: var(--green);
}

.open-link {
  background: #111827;
  color: #fff;
}

.sidebar {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 14px;
}

.side-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  padding: 20px;
}

.side-card h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.side-card p,
.side-card li {
  color: var(--muted);
  line-height: 1.65;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border-radius: 999px;
  background: var(--soft);
  padding: 6px 9px;
  color: #374151;
  font-size: 12px;
}

.error {
  border: 1px solid #fecaca;
  border-radius: 20px;
  background: #fef2f2;
  color: #991b1b;
  padding: 18px;
}

@media (max-width: 980px) {
  .hero,
  .layout,
  .card {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 18px;
  }

  .topbar,
  .brand {
    align-items: flex-start;
  }

  .topbar {
    flex-direction: column;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .copy-block {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
