/* ── 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;
  --danger:    #f85149;
  --radius:    8px;
  --gap:       1rem;
}

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;
}

/* ── typography ── */
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; }

p  { margin-bottom: .5rem; }
ol, ul { margin: .5rem 0 .5rem 1.5rem; }
li { margin-bottom: .25rem; }

img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ── nav / back link area ── */
.nav-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: .75rem 0 1.5rem;
}
.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;
}

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

/* ── list (generated by load.js) ── */
.list { display: flex; flex-direction: column; gap: .5rem; }

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

.list > div a {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  color: var(--text);
}
.list > div a:hover { color: var(--text); text-decoration: none; }

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

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

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

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