:root {
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-border: #e1e4e8;
  --color-text: #1f2328;
  --color-muted: #6a737d;
  --color-accent: #0969da;
  --color-active: #1a7f37;
  --color-archived: #6a737d;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 420px;
}

#search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.95rem;
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(140, 149, 159, 0.3);
  max-height: 60vh;
  overflow-y: auto;
}

.search-results a {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--color-bg); }

.search-results .result-title { font-weight: 600; }
.search-results .result-subtitle { font-size: 0.8rem; color: var(--color-muted); }
.search-results .result-type {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  margin-right: 0.4rem;
}

.search-results .no-results { padding: 0.5rem 0.75rem; color: var(--color-muted); }

main.wrap { padding-top: 1.5rem; padding-bottom: 3rem; }

h1 { margin-top: 0; }

.meta { color: var(--color-muted); }

.muted { color: var(--color-muted); }

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-active { background: #dafbe1; color: var(--color-active); }
.badge-archived { background: #eaeef2; color: var(--color-archived); }

.button {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  margin: 0.15rem 0.3rem 0.15rem 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.button:hover { background: var(--color-bg); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  margin: 1rem 0 2rem;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.data-table th {
  background: var(--color-bg);
  font-weight: 600;
}

.data-table tbody tr:hover { background: var(--color-bg); }

.site-footer {
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.85rem;
  padding: 1rem 0 2rem;
}

a { color: var(--color-accent); }
