:root {
  --bg: #ffffff;
  --bg-muted: #f7f8fa;
  --border: #e6e8eb;
  --border-strong: #d4d7dc;
  --text: #1a1d21;
  --text-muted: #5b626b;
  --text-faint: #8a909a;
  --primary: #1a1d21;
  --primary-hover: #000;
  --accent: #2f6f4f;
  --shadow-sm: 0 1px 2px rgba(20, 23, 28, 0.04);
  --shadow-md: 0 4px 16px rgba(20, 23, 28, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.nav a {
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--text); }
.nav-wiki { color: var(--accent); }

.hero {
  padding: 96px 0 72px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--text);
  background: var(--bg-muted);
}
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}
.section-muted { background: var(--bg-muted); }
.section-head {
  margin-bottom: 36px;
}
.section-head h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.section-head p {
  color: var(--text-muted);
  font-size: 15px;
}
.section-head a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.plugin-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.plugin-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.plugin-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.plugin-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  object-fit: cover;
}
.plugin-titles { display: flex; flex-direction: column; }
.plugin-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.plugin-slug {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-faint);
}
.plugin-summary {
  font-size: 14px;
  color: var(--text-muted);
  min-height: 42px;
}
.plugin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.plugin-stats > div { display: flex; flex-direction: column; gap: 2px; }
.plugin-stats dt {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-faint);
}
.plugin-stats dd {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.plugin-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.plugin-actions .btn { flex: 1; }

.changelog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.changelog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.changelog-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(47, 111, 79, 0.08);
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 8px;
}
.changelog-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.changelog-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  max-height: 420px;
  overflow-y: auto;
  white-space: normal;
  word-break: break-word;
  padding-right: 8px;
}
.changelog-body h1, .changelog-body h2, .changelog-body h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  margin: 16px 0 8px;
}
.changelog-body a { color: var(--accent); text-decoration: underline; }
.changelog-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--bg-muted);
  padding: 1px 5px;
  border-radius: 4px;
}
.changelog-body p {
  margin: 0 0 12px;
}

.changelog-body p:last-child {
  margin-bottom: 0;
}

.changelog-body ul,
.changelog-body ol {
  padding-left: 24px;
  margin: 8px 0 14px;
}

.changelog-body li {
  margin: 2px 0;
}

.changelog-body pre {
  margin: 12px 0;
  padding: 14px;
  overflow-x: auto;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.changelog-body pre code {
  padding: 0;
  background: transparent;
}

.changelog-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--text); }

@media (max-width: 600px) {
  .nav { gap: 18px; font-size: 13px; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 56px 0; }
  .changelog-head { flex-direction: column; }
}

.plugin-card[aria-busy="true"] .plugin-stats dd,
.plugin-card[aria-busy="true"] .plugin-summary {
  color: var(--text-faint);
}