/* ── reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d1117;
  --surface:  #161b22;
  --border:   #30363d;
  --text:     #c9d1d9;
  --text-dim: #8b949e;
  --accent:   #58a6ff;
  --accent-h: #79b8ff;
  --green:    #3fb950;
  --green-h:  #56d369;
  --danger:   #f85149;
  --radius:   8px;
}

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

h1 { font-size: 1.75rem; margin-bottom: .25rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1rem 0 .5rem; }


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

/* ── nav row ── */
.nav-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin: .75rem 0 1rem;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  text-decoration: none;
  font-size: .9rem;
  transition: background .15s, border-color .15s;
}
.nav-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
}
.nav-row a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  transition: background .15s, border-color .15s;
}
.nav-row a:hover {
  background: var(--surface);
  border-color: var(--accent);
  text-decoration: none;
}

/* ── list ── */
.list { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }

.list .item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.list .item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}


.item-info { margin-bottom: .5rem; }

.item-header {
  display: flex;
  align-items: baseline;
  gap: .5rem;
}

.item-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent);
}

.item-author {
  font-size: .85rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.item-desc {
  font-size: .9rem;
  color: var(--text-dim);
  margin-top: .25rem;
}

/* ── action buttons row ── */
.item-actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

.btn {
  flex-shrink: 0;
  padding: .35rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}

/* install / update */
.install-btn {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.install-btn:hover {
  background: var(--green-h);
  border-color: var(--green-h);
}

/* visually disabled but still clickable (for alert popup) */
.install-btn[aria-disabled="true"] {
  background: var(--surface);
  color: var(--text-dim);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: .5;
}
.install-btn[aria-disabled="true"]:hover {
  background: var(--surface);
  border-color: var(--border);
}

/* copy / doc buttons */
.copy-btn {
  background: transparent;
  color: var(--text);
}
.copy-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
}

/* status */
.list-status {
  color: var(--text-dim);
  text-align: center;
  padding: 2rem 0;
}

/* ── responsive ── */
@media (max-width: 600px) {
  body { padding: 1rem .5rem; }
  h1 { font-size: 1.4rem; }
}

/* ── disclaimer / muted text ── */
.muted { color: var(--text-dim); }
