* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; background: #fafafa; color: #1a1a1a; line-height: 1.6; }
a { color: #7B2D8E; text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: 'SF Mono', 'Fira Code', monospace; }

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

header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 16px 0; }
header .container { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
header h1 { font-size: 1.3rem; white-space: nowrap; }
header h1 .mp { color: #7B2D8E; }
header h1 .comp { color: #0D9488; }
#search { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 0.95rem; outline: none; }
#search:focus { border-color: #7B2D8E; box-shadow: 0 0 0 2px rgba(123,45,142,0.1); }
nav a { font-size: 0.9rem; color: #555; }
nav a:hover { color: #7B2D8E; }

.stats { display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px 20px; flex: 1; min-width: 120px; text-align: center; }
.stat .num { font-size: 1.6rem; font-weight: 700; color: #7B2D8E; }
.stat .label { font-size: 0.8rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }

/* Filter bar */
.filter-bar { display: flex; gap: 8px; margin: 16px 0 12px; flex-wrap: wrap; align-items: center; }
.filter-group { display: flex; gap: 4px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 3px; }
.filter-btn { background: transparent; border: none; padding: 6px 14px; border-radius: 6px; font-size: 0.85rem; cursor: pointer; color: #555; font-weight: 500; transition: all 0.15s; }
.filter-btn:hover { background: #f3f4f6; }
.filter-btn.active { background: #7B2D8E; color: #fff; }
.filter-label { font-size: 0.8rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 4px; }

/* Category chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.chip { background: #fff; border: 1px solid #e5e7eb; padding: 5px 12px; border-radius: 999px; font-size: 0.8rem; cursor: pointer; transition: all 0.15s; color: #555; text-transform: capitalize; }
.chip:hover { border-color: #7B2D8E; color: #7B2D8E; }
.chip.active { background: #7B2D8E; color: #fff; border-color: #7B2D8E; }

/* Cards */
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px 18px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s; }
.card:hover { border-color: #7B2D8E; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.card-row { display: flex; align-items: center; gap: 12px; }
.tier { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; }
.tier-mp { background: #7B2D8E; }
.tier-comp { background: #0D9488; }
.tier-mcomp { background: #D97706; }
.card-body { flex: 1; min-width: 0; }
.card-title { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-meta { font-size: 0.8rem; color: #888; margin-top: 2px; }
.card-meta span { margin-right: 12px; }
.card-downloads { font-size: 0.85rem; color: #888; white-space: nowrap; font-weight: 500; }
.card-snippet { font-size: 0.85rem; color: #555; margin-top: 8px; padding-left: 0; line-height: 1.4; opacity: 0.85; }

/* Official badge */
.badge-official { background: linear-gradient(135deg, #7B2D8E, #0D9488); color: #fff; padding: 1px 7px; border-radius: 999px; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 3px; }
.badge-official::before { content: "✓"; font-size: 0.7rem; }

.section-title { font-size: 1.1rem; font-weight: 600; margin: 24px 0 12px; color: #333; display: flex; align-items: center; gap: 12px; }
.section-title-meta { font-size: 0.8rem; color: #888; font-weight: 400; }
.back { display: inline-block; margin-bottom: 16px; font-size: 0.9rem; }

.detail-header { margin-bottom: 20px; }
.detail-header h2 { font-size: 1.4rem; margin: 8px 0; }
.detail-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.9rem; color: #555; margin: 12px 0; }
.detail-meta strong { color: #333; }

pre.content { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; overflow-x: auto; font-size: 0.85rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; position: relative; }
pre.content .copy-btn { position: absolute; top: 8px; right: 8px; }

.copy-block { position: relative; background: #1a1a2e; color: #e0e0e0; border-radius: 8px; padding: 12px 48px 12px 16px; margin: 12px 0; font-size: 0.85rem; overflow-x: auto; }
.copy-btn { background: rgba(255,255,255,0.15); border: none; color: #ccc; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.copy-btn:hover { background: rgba(255,255,255,0.25); }
.copy-block .copy-btn { position: absolute; top: 8px; right: 8px; }

.pubkey { font-size: 0.8rem; color: #666; word-break: break-all; }

.install-page h2 { margin-bottom: 16px; }
.install-page h3 { margin: 20px 0 8px; font-size: 1rem; color: #555; }
.install-page p { margin: 8px 0; font-size: 0.9rem; color: #555; }

.empty { text-align: center; color: #999; padding: 40px 0; font-size: 0.95rem; }
.loading { text-align: center; color: #999; padding: 40px 0; }

@media (max-width: 600px) {
  header .container { flex-direction: column; align-items: stretch; }
  .stats { flex-direction: column; }
  .card-row { flex-direction: column; align-items: flex-start; }
}
