/* AI Open Source Radar — self-contained stylesheet (no external fonts/CDNs). */

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-inset: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --track: #21262d;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-card: #f6f8fa;
    --bg-inset: #eaeef2;
    --border: #d0d7de;
    --text: #1f2328;
    --text-muted: #636c76;
    --accent: #0969da;
    --green: #1a7f37;
    --track: #eaeef2;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg-card); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 8px 24px; padding: 18px 20px;
}
.site-title { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.site-title:hover { color: var(--accent); text-decoration: none; }
.tagline { margin: 2px 0 0; color: var(--text-muted); font-size: 0.85rem; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 6px 12px; border-radius: 6px;
  color: var(--text-muted); font-weight: 600; font-size: 0.9rem;
}
.site-nav a:hover { color: var(--text); background: var(--bg-inset); text-decoration: none; }
.site-nav a.active { color: var(--text); background: var(--bg-inset); }

.site-footer {
  margin-top: 48px; padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.85rem; text-align: center;
}
.site-footer p { margin: 4px 0; }

/* page head */
.page-head { margin: 28px 0 16px; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.day-label { margin: 4px 0 0; color: var(--text-muted); }

.empty {
  margin: 32px 0; padding: 32px; text-align: center;
  color: var(--text-muted); border: 1px dashed var(--border); border-radius: 10px;
}
[hidden] { display: none !important; }

/* filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 20px; }
.filter-bar input[type="search"], .filter-bar select {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 10px; font: inherit; font-size: 0.9rem;
}
.filter-bar input[type="search"] { flex: 1 1 220px; min-width: 0; }
.filter-bar input:focus, .filter-bar select:focus {
  outline: none; border-color: var(--accent);
}

/* cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 800px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rank { color: var(--text-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.repo-name { font-weight: 700; word-break: break-all; }
.one-liner { margin: 0; font-size: 1.05rem; line-height: 1.45; }
.desc { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* hot score bar */
.score-row { display: flex; align-items: center; gap: 8px; }
.score-label { color: var(--text-muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.scorebar {
  flex: 1 1 auto; height: 8px; min-width: 60px; max-width: 260px;
  background: var(--track); border-radius: 4px; overflow: hidden; display: inline-block;
}
.scorebar-fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.score-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.stars-display { color: #e3b341; letter-spacing: 1px; font-size: 0.9rem; }

/* meta */
.meta-row { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; }
.meta { color: var(--text-muted); font-size: 0.83rem; }
.lang::before {
  content: ""; display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); margin-right: 5px;
}
.delta { font-weight: 600; }
.delta.up { color: var(--green); }

/* key/value detail blocks */
.kv { font-size: 0.9rem; }
.kv .k, .meter .k, .sources .k {
  display: block; color: var(--text-muted);
  font-size: 0.75rem; font-weight: 700; margin-bottom: 2px;
}
.kv p { margin: 0; }
.kv.highlight p {
  border-left: 3px solid var(--accent);
  padding: 4px 10px; background: var(--bg-inset); border-radius: 0 6px 6px 0;
}

/* meters */
.meters { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--track); border: 1px solid var(--border);
}
.dot.on { background: var(--accent); border-color: var(--accent); }
.rating { font-weight: 700; }

/* tags & source badges */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.tag {
  font-size: 0.75rem; color: var(--text-muted);
  background: var(--bg-inset); border-radius: 999px; padding: 1px 9px;
}
.sources { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.sources .k { display: inline; margin: 0 4px 0 0; }
.badge {
  display: inline-block; font-size: 0.74rem; font-weight: 600;
  padding: 1px 9px; border-radius: 999px; line-height: 1.7; white-space: nowrap;
}
.badge.source {
  color: var(--text); background: var(--bg-inset); border: 1px solid var(--border);
}

/* category badge colors (muted, per category) */
.cat-agent    { --c: #3fb950; }
.cat-rag      { --c: #a371f7; }
.cat-mcp      { --c: #39c5cf; }
.cat-coding   { --c: #58a6ff; }
.cat-vision   { --c: #db61a2; }
.cat-voice    { --c: #f0883e; }
.cat-llm      { --c: #e3b341; }
.cat-browser  { --c: #79c0ff; }
.cat-security { --c: #f85149; }
.cat-infra    { --c: #7ee787; }
.cat-other    { --c: #8b949e; }
[class*="cat-"] {
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
@media (prefers-color-scheme: light) {
  [class*="cat-"] { color: color-mix(in srgb, var(--c) 70%, #1f2328); }
}

/* hot100 table */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.hot-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 640px; }
.hot-table th, .hot-table td {
  padding: 9px 12px; text-align: left;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.hot-table thead th {
  background: var(--bg-card); color: var(--text-muted);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.hot-table tbody tr:last-child td { border-bottom: none; }
.hot-table tbody tr:hover { background: var(--bg-card); }
.col-rank { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.col-score { min-width: 160px; }

/* archive list */
.archive-list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.archive-item {
  display: flex; justify-content: space-between; align-items: baseline;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px;
}
.archive-item a { font-weight: 600; font-variant-numeric: tabular-nums; }


/* 구독 링크 (RSS·뉴스레터) — 2026-09-22 */
.site-footer .subscribe { margin-top: .5rem; font-size: .9rem; }
.site-footer .subscribe a { color: var(--accent, #58a6ff); text-decoration: none; }
.site-footer .subscribe a:hover { text-decoration: underline; }
