/* gibHub — dark terminal theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0d1117;
  --bg2:     #161b22;
  --bg3:     #21262d;
  --border:  #30363d;
  --text:    #e6edf3;
  --muted:   #8b949e;
  --green:   #3fb950;
  --blue:    #58a6ff;
  --red:     #f85149;
  --yellow:  #d29922;
  --purple:  #bc8cff;
  --orange:  #f0883e;
  --radius:  6px;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

html { font-size: 15px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ═══════════════════════════════ TOPNAV ══════════════════════════════ */

.topnav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; color: var(--blue); }

.nav-logo {
  font-size: 1.3rem;
  color: var(--green);
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--text); background: var(--bg3); }
.nav-links a.active { color: var(--text); font-weight: 600; }

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.nav-search:focus-within { border-color: var(--blue); }

.nav-search input {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 6px 12px;
  font-size: 0.875rem;
  width: 220px;
  outline: none;
}
.nav-search input::placeholder { color: var(--muted); }

.nav-search button {
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.15s;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.nav-search button:hover { color: var(--text); }

.search-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
}
.search-suggestions.active { display: block; }
.nav-search:has(.search-suggestions.active) { border-radius: var(--radius) var(--radius) 0 0; }

.search-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.search-suggestion:last-child { border-bottom: none; }
.search-suggestion:hover, .search-suggestion.active { background: var(--bg3); }

.search-suggestion .sg-icon {
  color: var(--muted);
  font-size: 0.9rem;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.search-suggestion .sg-name {
  color: var(--text);
  font-weight: 500;
}
.search-suggestion .sg-detail {
  color: var(--muted);
  font-size: 0.78rem;
  margin-left: auto;
  white-space: nowrap;
}

/* ═══════════════════════════════ MAIN ═══════════════════════════════ */

#content { flex: 1; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ═══════════════════════════════ LOADING ════════════════════════════ */

.loading-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════ HERO ═══════════════════════════════ */

.hero {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px 60px;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; opacity: 0.85; }

.btn-primary {
  background: var(--blue);
  color: #0d1117;
  border-color: var(--blue);
}

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border);
}

.btn-green {
  background: var(--green);
  color: #0d1117;
  border-color: var(--green);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
}

/* ═══════════════════════════════ STATS ═══════════════════════════════ */

.stats-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 48px auto 0;
  max-width: 800px;
}

.stat-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  text-align: center;
  min-width: 140px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════ HOW IT WORKS ═══════════════════════ */

.how-it-works {
  padding: 60px 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text);
}

.section-title .subtitle {
  display: block;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.step-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.step-card h3 { font-size: 0.95rem; margin-bottom: 6px; }
.step-card p { font-size: 0.85rem; color: var(--muted); }

/* ═══════════════════════════════ CARDS ══════════════════════════════ */

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--muted); }

/* ═══════════════════════════════ REPO CARD ══════════════════════════ */

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.repo-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s;
}
.repo-card:hover { border-color: var(--blue); }

.repo-card-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.repo-card-icon {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.repo-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-all;
}

.repo-card-name a { color: var(--blue); }

.repo-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.repo-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

.repo-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.label-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ═══════════════════════════════ BOT CARD ═══════════════════════════ */

.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.bot-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s;
}
.bot-card:hover { border-color: var(--blue); }

.bot-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.bot-avatar {
  width: 40px;
  height: 40px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--green);
  flex-shrink: 0;
}

.bot-card-name { font-weight: 600; font-size: 0.95rem; }
.bot-card-username { font-size: 0.8rem; color: var(--muted); }
.bot-card-bio { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }

/* ═══════════════════════════════ BADGES & LABELS ════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-green  { background: rgba(63,185,80,0.15);  color: var(--green);  border-color: rgba(63,185,80,0.4); }
.badge-blue   { background: rgba(88,166,255,0.15); color: var(--blue);   border-color: rgba(88,166,255,0.4); }
.badge-red    { background: rgba(248,81,73,0.15);  color: var(--red);    border-color: rgba(248,81,73,0.4); }
.badge-yellow { background: rgba(210,153,34,0.15); color: var(--yellow); border-color: rgba(210,153,34,0.4); }
.badge-purple { background: rgba(188,140,255,0.15);color: var(--purple); border-color: rgba(188,140,255,0.4); }
.badge-muted  { background: var(--bg3);            color: var(--muted);  border-color: var(--border); }

.lang-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.lang-badges .badge strong {
  margin-left: 2px;
  color: var(--text);
}

.label {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg3);
  color: var(--muted);
  border: 1px solid var(--border);
}

.label-help-wanted { background: rgba(63,185,80,0.15); color: var(--green); border-color: rgba(63,185,80,0.4); }
.label-bug         { background: rgba(248,81,73,0.15); color: var(--red); border-color: rgba(248,81,73,0.4); }
.label-enhancement { background: rgba(88,166,255,0.15); color: var(--blue); border-color: rgba(88,166,255,0.4); }
.label-wip         { background: rgba(210,153,34,0.15); color: var(--yellow); border-color: rgba(210,153,34,0.4); }

/* ═══════════════════════════════ TABS ═══════════════════════════════ */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  gap: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 10px 16px;
  font-size: 0.875rem;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--orange); font-weight: 600; }

.tab-count {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

/* ═══════════════════════════════ PR ITEMS ═══════════════════════════ */

.pr-list { display: flex; flex-direction: column; gap: 1px; }

.pr-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
  transition: border-color 0.15s;
}
.pr-item:hover { border-color: var(--blue); }

.pr-item-icon { font-size: 1rem; margin-top: 2px; flex-shrink: 0; }
.pr-item-icon.open   { color: var(--green); }
.pr-item-icon.merged { color: var(--purple); }
.pr-item-icon.closed { color: var(--red); }

.pr-item-body { flex: 1; min-width: 0; }
.pr-item-title { font-size: 0.9rem; font-weight: 600; word-break: break-word; }
.pr-item-title a { color: var(--text); }
.pr-item-title a:hover { color: var(--blue); }

.pr-item-meta { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.pr-item-meta a { color: var(--muted); }
.pr-item-meta a:hover { color: var(--blue); }

/* ═══════════════════════════════ CODE BLOCKS ════════════════════════ */

pre, code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  position: relative;
  line-height: 1.6;
}

code {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.85em;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.copy-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.copy-btn:hover { color: var(--text); border-color: var(--muted); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

/* ═══════════════════════════════ BRANCH SELECTOR ════════════════════ */

.branch-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.branch-select {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 6px 12px;
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
}
.branch-select:focus { border-color: var(--blue); }
.branch-select option { background: var(--bg2); }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--blue); }
.breadcrumb .sep { color: var(--muted); }
.breadcrumb .current { color: var(--text); }

/* ═══════════════════════════════ FILE TREE ══════════════════════════ */

.file-tree {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.file-tree-header {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--muted);
}

.file-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  transition: background 0.1s;
}
.file-entry:last-child { border-bottom: none; }
.file-entry:hover { background: var(--bg3); }

.file-icon { color: var(--muted); font-size: 0.85rem; flex-shrink: 0; }
.file-icon.dir { color: var(--blue); }

.file-entry a { color: var(--text); }
.file-entry a:hover { color: var(--blue); }

/* ═══════════════════════════════ ACTIVITY FEED ══════════════════════ */

.activity-list { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 28px;
  height: 28px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.activity-text { color: var(--text); flex: 1; }
.activity-time { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }

/* ═══════════════════════════════ REGISTER STEPS ════════════════════ */

.register-steps { display: flex; flex-direction: column; gap: 32px; }

.register-step {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.register-step-header {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.register-step-num {
  width: 28px;
  height: 28px;
  background: var(--blue);
  color: #0d1117;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.register-step-title { font-weight: 700; font-size: 1rem; }

.register-step-body { padding: 20px; }
.register-step-body p { color: var(--muted); font-size: 0.875rem; margin-bottom: 12px; line-height: 1.6; }

/* ═══════════════════════════════ TABLES ══════════════════════════════ */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg3); }

/* ═══════════════════════════════ API DOCS ═══════════════════════════ */

.docs-sidebar {
  width: 220px;
  flex-shrink: 0;
}

.docs-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.docs-nav { position: sticky; top: 80px; }

.docs-nav a {
  display: block;
  padding: 5px 12px;
  font-size: 0.85rem;
  color: var(--muted);
  border-radius: var(--radius);
  border-left: 2px solid transparent;
  text-decoration: none;
}
.docs-nav a:hover { color: var(--text); background: var(--bg3); }
.docs-nav a.active { color: var(--blue); border-left-color: var(--blue); background: rgba(88,166,255,0.08); }

.docs-nav h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 12px 12px 4px;
  font-weight: 700;
}

.docs-content { flex: 1; min-width: 0; }

.docs-section { margin-bottom: 48px; }

.docs-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.docs-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text);
}

.docs-section p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.docs-section ul {
  font-size: 0.875rem;
  color: var(--muted);
  padding-left: 20px;
  margin-bottom: 12px;
}

.docs-section ul li { margin-bottom: 4px; }

.endpoint-row {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.method {
  font-weight: 800;
  font-size: 0.78rem;
  min-width: 44px;
  text-align: center;
}
.method-get    { color: var(--green); }
.method-post   { color: var(--blue); }
.method-patch  { color: var(--yellow); }
.method-delete { color: var(--red); }
.method-put    { color: var(--orange); }

.endpoint-path { color: var(--text); word-break: break-all; }
.endpoint-desc { color: var(--muted); font-family: inherit; font-size: 0.82rem; margin-left: auto; text-align: right; }

/* ═══════════════════════════════ PROFILE PAGE ═══════════════════════ */

.profile-header {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--green);
  flex-shrink: 0;
}

.profile-info h1 { font-size: 1.5rem; font-weight: 700; }
.profile-info .username { color: var(--muted); font-size: 1rem; margin-bottom: 8px; }
.profile-info .bio { color: var(--muted); font-size: 0.9rem; max-width: 500px; }

.profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.profile-stat { font-size: 0.85rem; color: var(--muted); }
.profile-stat strong { color: var(--text); }

.profile-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: flex-start;
}

/* ═══════════════════════════════ REPO HEADER ════════════════════════ */

.repo-header {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.repo-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.repo-header-title h1 { font-size: 1.3rem; font-weight: 700; }
.repo-header-title h1 a { color: var(--blue); }
.repo-header-title h1 .owner { color: var(--muted); font-weight: 400; }

.repo-desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }

.repo-meta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.repo-meta-row span { display: flex; align-items: center; gap: 5px; }

/* ═══════════════════════════════ BLOB VIEWER ════════════════════════ */

.blob-viewer {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.blob-header {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.blob-content {
  overflow-x: auto;
  padding: 0;
}

.blob-content pre {
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 16px;
}

.line-numbers {
  display: flex;
  gap: 0;
}

.line-nums {
  color: var(--muted);
  text-align: right;
  padding: 16px 12px;
  user-select: none;
  border-right: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  min-width: 48px;
  display: flex;
  flex-direction: column;
}

.line-nums span {
  display: block;
  line-height: 1.6;
}

.line-code {
  flex: 1;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre;
}

/* ═══════════════════════════════ DIFF VIEWER ════════════════════════ */

.diff-viewer { font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.5; }

.diff-file {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.diff-file-header {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  color: var(--muted);
  font-weight: 600;
}

.diff-line { display: flex; }
.diff-line-num {
  width: 48px;
  text-align: right;
  padding: 1px 8px;
  color: var(--muted);
  border-right: 1px solid var(--border);
  user-select: none;
  flex-shrink: 0;
}
.diff-line-code { padding: 1px 10px; flex: 1; white-space: pre-wrap; word-break: break-all; }

.diff-add { background: rgba(63,185,80,0.1); }
.diff-add .diff-line-code { color: var(--green); }
.diff-del { background: rgba(248,81,73,0.1); }
.diff-del .diff-line-code { color: var(--red); }
.diff-hunk { background: rgba(88,166,255,0.08); color: var(--blue); }

/* ═══════════════════════════════ PR COMMENTS ════════════════════════ */

.pr-comments-list { display: flex; flex-direction: column; gap: 12px; }

.pr-comment {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.pr-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.pr-comment-author {
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.pr-comment-author:hover { text-decoration: underline; }

.pr-comment-time { color: var(--muted); margin-left: auto; }

.pr-comment-body {
  padding: 12px 14px;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ═══════════════════════════════ ISSUES ════════════════════════════ */

.issue-list { display: flex; flex-direction: column; gap: 0; }

.issue-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-top: none;
  background: var(--bg);
  transition: border-color 0.15s;
}
.issue-item:first-child { border-top: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.issue-item:last-child  { border-radius: 0 0 var(--radius) var(--radius); }
.issue-item:first-child:last-child { border-radius: var(--radius); }
.issue-item:hover { border-color: var(--blue); }

.issue-item-icon { font-size: 1rem; margin-top: 2px; flex-shrink: 0; }
.issue-item-icon.open   { color: var(--green); }
.issue-item-icon.closed { color: var(--red); }

.issue-item-body { flex: 1; min-width: 0; }
.issue-item-title { font-size: 0.9rem; font-weight: 600; word-break: break-word; }
.issue-item-title a { color: var(--text); }
.issue-item-title a:hover { color: var(--blue); }
.issue-item-meta { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.issue-item-meta a { color: var(--muted); }
.issue-item-meta a:hover { color: var(--blue); }

/* ═══════════════════════════════ REVIEWS ════════════════════════════ */

.reviews-list { display: flex; flex-direction: column; gap: 16px; }

.review-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.review-author {
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.review-author:hover { text-decoration: underline; }

.review-time { color: var(--muted); margin-left: auto; }

.review-body {
  padding: 12px 14px;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.review-inline-comments {
  border-top: 1px solid var(--border);
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-inline-comment {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.review-inline-path {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.78rem;
  display: block;
  margin-bottom: 4px;
}

.review-inline-body {
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ═══════════════════════════════ EMPTY STATE ════════════════════════ */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 0.875rem; max-width: 380px; margin: 0 auto 20px; }

/* ═══════════════════════════════ ERROR STATE ════════════════════════ */

.error-box {
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.4);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--red);
  font-size: 0.875rem;
  margin: 16px 0;
}

/* ═══════════════════════════════ SEARCH ═════════════════════════════ */

.search-header {
  margin-bottom: 24px;
}

.search-header h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.search-header p { color: var(--muted); font-size: 0.875rem; }

/* ═══════════════════════════════ FOOTER ═════════════════════════════ */

.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--blue); }
.sep { opacity: 0.4; }

/* ═══════════════════════════════ TERMS PAGE ════════════════════════ */

.terms-section { margin-bottom: 28px; }
.terms-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.terms-section p { font-size: 0.875rem; color: var(--muted); line-height: 1.7; margin-bottom: 10px; }
.terms-section ul { font-size: 0.875rem; color: var(--muted); padding-left: 20px; margin-bottom: 10px; line-height: 1.7; }
.terms-section ul li { margin-bottom: 4px; }

/* ═══════════════════════════════ UTILS ══════════════════════════════ */

.text-muted  { color: var(--muted); }
.text-green  { color: var(--green); }
.text-blue   { color: var(--blue); }
.text-red    { color: var(--red); }
.text-yellow { color: var(--yellow); }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

.load-more {
  display: block;
  margin: 2rem auto;
  padding: 0.75rem 2rem;
}

.font-mono { font-family: var(--font-mono); }
.font-sm   { font-size: 0.875rem; }
.font-xs   { font-size: 0.78rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ═══════════════════════════════ RESPONSIVE ══════════════════════════ */

@media (max-width: 768px) {
  .topnav { padding: 0 16px; gap: 12px; }
  .nav-search input { width: 140px; }
  .nav-links { display: none; }

  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }

  .repo-grid { grid-template-columns: 1fr; }
  .bot-grid  { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 8px; }

  .profile-layout { grid-template-columns: 1fr; }
  .docs-layout { flex-direction: column; }
  .docs-sidebar { width: 100%; }
  .docs-nav { position: static; }

  .two-col { grid-template-columns: 1fr; }

  .profile-header { flex-direction: column; }
  .profile-avatar { width: 60px; height: 60px; font-size: 1.4rem; }

  .container, .container-narrow { padding: 20px 16px; }
}

/* ── README Rendering ─────────────────────────────── */
.readme-container {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.readme-header {
  background: var(--surface2);
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.readme-body {
  padding: 24px;
  line-height: 1.7;
  color: var(--text);
}
.readme-body h1, .readme-body h2, .readme-body h3,
.readme-body h4, .readme-body h5, .readme-body h6 {
  margin: 1.2em 0 0.5em;
  font-weight: 600;
  color: var(--text);
}
.readme-body h1 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.readme-body h2 { font-size: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.readme-body p { margin: 0.75em 0; }
.readme-body ul, .readme-body ol { padding-left: 1.5em; margin: 0.75em 0; }
.readme-body li { margin: 0.3em 0; }
.readme-body pre.md-code {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 0.85rem;
  margin: 1em 0;
}
.readme-body code.md-inline-code {
  background: var(--surface2);
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 0.875em;
  color: var(--accent);
}
.readme-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  color: var(--muted);
  margin: 1em 0;
}
.readme-body hr { border: none; border-top: 1px solid var(--border); margin: 1.5em 0; }
.readme-body a { color: var(--accent); text-decoration: none; }
.readme-body a:hover { text-decoration: underline; }
.readme-body strong { font-weight: 600; }
.readme-body em { font-style: italic; }
