/* Nav */
.nav { margin-bottom: 1.75rem; font-size: .875rem; color: #9ca3af; display: flex; align-items: center; gap: 0.75rem; }
.nav a { color: #9ca3af; text-decoration: none; }
.nav a:hover { color: #f3f4f6; }
.search-btn { background: none; border: 1px solid #374151; border-radius: 5px; color: #6b7280; cursor: pointer; font-size: 0.95rem; line-height: 1; padding: 0.1rem 0.35rem; margin-left: auto; transition: border-color 0.1s, color 0.1s; }
.search-btn:hover { border-color: #6b7280; color: #d1d5db; }

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

/* Base */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #111827;
  color: #f3f4f6;
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
}

a { color: #60a5fa; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Search overlay */
.search-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: flex; align-items: flex-start; justify-content: center; padding-top: 10vh; z-index: 9999; }
.search-modal { background: #1f2937; border: 1px solid #374151; border-radius: 12px; width: min(620px, 90vw); overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,0.6); }
.search-input { width: 100%; padding: 0.9rem 1.25rem; font-size: 1rem; background: transparent; border: none; border-bottom: 1px solid #374151; color: #f3f4f6; outline: none; font-family: inherit; }
.search-results { max-height: 55vh; overflow-y: auto; }
.search-result { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.25rem; text-decoration: none; color: #f3f4f6; border-bottom: 1px solid #111827; }
.search-result:hover, .search-result.active { background: #374151; }
.search-result-name { font-size: 0.9rem; font-weight: 600; }
.search-result-meta { font-size: 0.78rem; color: #9ca3af; margin-left: auto; white-space: nowrap; }
.search-hint { padding: 0.4rem 1.25rem; font-size: 0.7rem; color: #4b5563; border-top: 1px solid #374151; }
.search-empty { padding: 1rem 1.25rem; font-size: 0.85rem; color: #6b7280; }

/* Sortable table headers */
thead th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 1px solid #374151;
  cursor: pointer;
  user-select: none;
}
thead th:hover { color: #d1d5db; }
thead th[data-active="true"] { color: #93c5fd; }
thead th .sort-arrow { margin-left: 4px; font-size: 0.65rem; }
thead th.right { text-align: right; }
