*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-row: #0d1117;
  --bg-row-hover: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --green: #3fb950;
  --yellow: #d29922;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(110,118,129,0.2);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13,17,23,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}

.nav-brand:hover { color: var(--text); }


.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 13px;
}

.nav-links a:hover { color: var(--text); }

/* Hero */
.hero {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.hero-actions { display: flex; gap: 10px; }

.btn {
  display: inline-block;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  text-decoration: none !important;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg) !important;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg) !important;
}

.btn-ghost {
  color: var(--text-muted) !important;
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text) !important;
}

/* Stats bar */
.stats-bar {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  background: var(--bg-surface);
}

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

.stat {
  color: var(--text-muted);
  font-size: 13px;
}

.stat strong {
  color: var(--text);
  margin-right: 4px;
}

/* Ecosystem */
.ecosystem {
  padding: 32px 0 48px;
}

.ecosystem > .container > h2 {
  font-size: 1.3rem;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Category */
.cat { margin-bottom: 28px; }

.cat h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cat-note {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
}

/* Row-based layout */
.rows {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 140px 70px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background 0.1s;
}

.row:last-child { border-bottom: none; }

.row:hover {
  background: var(--bg-row-hover);
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 3px 0 0 var(--accent);
}

.row-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.row:hover .row-name { color: var(--accent-hover); }

.row-desc {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-tags {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
  opacity: 0.7;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
}

.badge-ok {
  background: rgba(63,185,80,0.15);
  color: var(--green);
  border: 1px solid rgba(63,185,80,0.3);
}

.badge-wip {
  background: rgba(210,153,34,0.15);
  color: var(--yellow);
  border: 1px solid rgba(210,153,34,0.3);
}

/* Callout */
.callout {
  background: rgba(210,153,34,0.08);
  border: 1px solid rgba(210,153,34,0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.callout strong {
  color: var(--yellow);
}

.callout a {
  color: var(--accent);
}

/* Quick Start */
.quickstart {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.quickstart h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 14px;
}

.quickstart pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
}

.quickstart pre code {
  background: none;
  padding: 0;
}

.kw { color: #ff7b72; }
.fn { color: #d2a8ff; }
.str { color: #a5d6ff; }
.cm { color: #8b949e; }

/* Footer */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  color: var(--text-muted);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 700px) {
  .row {
    grid-template-columns: 120px 60px 1fr;
  }
  .row-tags { display: none; }
  .row-desc { white-space: normal; }
  .stats-inner { gap: 16px; }
  .footer-inner { flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .row { grid-template-columns: 100px 56px 1fr; padding: 6px 10px; }
  .nav-links { gap: 12px; }
}
