/*── Reset & Variables ────────────────────────────────────────────*/
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#0d1117;--bg-card:#161b22;--bg-elevated:#1c2129;--bg-hover:#1f2937;
  --bg-glass:rgba(13,17,23,.85);--border:rgba(48,54,61,.65);--border-subtle:rgba(48,54,61,.4);
  --text:#e6edf3;--text-secondary:#8b949e;--text-tertiary:#484f58;
  --accent:#58a6ff;--accent-soft:rgba(88,166,255,.1);--accent-glow:rgba(88,166,255,.25);
  --green:#3fb950;--green-soft:rgba(63,185,80,.12);
  --red:#f85149;--red-soft:rgba(248,81,73,.12);
  --orange:#d29922;--purple:#bc8cff;--purple-soft:rgba(188,140,255,.12);
  --cyan:#39d2c0;
  --gradient-accent:linear-gradient(135deg,#58a6ff,#bc8cff);
  --gradient-subtle:linear-gradient(135deg,rgba(88,166,255,.06),rgba(188,140,255,.06));
  --font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,"SF Mono","Cascadia Code","Fira Code",Consolas,"Liberation Mono",Menlo,monospace;
  --radius-sm:2px;--radius:3px;--radius-lg:4px;--radius-xl:4px;
  --shadow-sm:0 1px 0 rgba(27,31,36,.04);--shadow:0 3px 6px rgba(0,0,0,.3);--shadow-lg:0 8px 24px rgba(0,0,0,.4);
  --transition:150ms cubic-bezier(.4,0,.2,1);
  --header-height:62px;
}
html{background:var(--bg);color:var(--text);font-family:var(--font-sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body{min-height:100vh;overflow-x:hidden;display:flex;flex-direction:column}
a{color:var(--accent);text-decoration:none;transition:color var(--transition)}
a:hover{color:#79c0ff;text-decoration:underline}
::selection{background:var(--accent-soft);color:var(--accent)}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:99px}
::-webkit-scrollbar-thumb:hover{background:var(--text-tertiary)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--radius-sm)}
:focus:not(:focus-visible){outline:none}
button:focus-visible,.ref-btn:focus-visible,.clone-btn:focus-visible{
  outline:2px solid var(--accent);outline-offset:2px;
}
.repo-card:focus-visible{
  outline:2px solid var(--accent);outline-offset:-2px;
  border-color:var(--accent);
}
/*── Skip Link (Accessibility) ────────────────────────────────────*/
.skip-link{
  position:absolute;top:-100px;left:0;background:var(--accent);color:#fff;
  padding:.75rem 1.5rem;z-index:999;font-weight:600;border-radius:0 0 var(--radius) 0;
  transition:top .2s ease;
}
.skip-link:focus{top:0}

/*── Animations ───────────────────────────────────────────────────*/
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes fadeInUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@keyframes slideDown{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}
@keyframes gradientShift{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
.animate-in{animation:fadeIn .3s ease-out both}
.animate-up{animation:fadeInUp .4s ease-out both}
.stagger-1{animation-delay:.05s}.stagger-2{animation-delay:.1s}.stagger-3{animation-delay:.15s}
.stagger-4{animation-delay:.2s}.stagger-5{animation-delay:.25s}

/*── Skeleton Loaders ─────────────────────────────────────────────*/
.skeleton{background:linear-gradient(90deg,var(--bg-elevated) 25%,var(--bg-hover) 50%,var(--bg-elevated) 75%);background-size:200% 100%;animation:shimmer 1.8s ease-in-out infinite;border-radius:var(--radius-sm)}
.skeleton-text{height:14px;margin:6px 0;border-radius:4px}
.skeleton-text.w-25{width:25%}.skeleton-text.w-50{width:50%}.skeleton-text.w-75{width:75%}.skeleton-text.w-100{width:100%}
.skeleton-card{height:80px;border-radius:var(--radius);margin-bottom:10px}
.skeleton-row{height:42px;border-radius:0;margin:0;border-bottom:1px solid var(--border-subtle)}
.skeleton-card-wrap{
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);
  padding:1.25rem;
}
.skeleton-row-wrap{
  display:flex;align-items:center;gap:.65rem;
  padding:.5rem 1rem;border-bottom:1px solid var(--border-subtle);
}
.skeleton-row-wrap:last-child{border-bottom:none}
.skel-row{display:flex;align-items:center;gap:.65rem}

/*── Loading Bar ──────────────────────────────────────────────────*/
.loading-bar{
  position:fixed;top:0;left:0;height:3px;
  background:var(--accent);
  z-index:9999;transition:width .4s ease,opacity .3s ease;
}

/*── Header ───────────────────────────────────────────────────────*/
header{
  position:sticky;top:0;z-index:100;
  height:var(--header-height);
  background:var(--bg-card);
  border-bottom:1px solid var(--border);
  padding:0 1.5rem;
  display:flex;align-items:center;gap:1.25rem;
}
header .logo{
  font-size:1.1rem;font-weight:700;color:var(--text);
  display:flex;align-items:center;gap:.6rem;
  cursor:pointer;transition:opacity var(--transition);
  text-decoration:none;
}
header .logo:hover{opacity:.8;text-decoration:none}
header .logo-icon{
  width:32px;height:32px;
  background:var(--accent);
  border-radius:var(--radius);
  display:flex;align-items:center;justify-content:center;
  font-size:15px;font-weight:800;color:#fff;
  letter-spacing:-0.5px;
}
header nav{margin-left:auto;display:flex;gap:.5rem;align-items:center}
header nav a{
  color:var(--text-secondary);padding:.45rem .85rem;border-radius:var(--radius);
  font-size:.85rem;font-weight:500;transition:all var(--transition);
}
header nav a:hover{color:var(--text);background:var(--bg-hover);text-decoration:none}
header nav a.active{color:var(--text);font-weight:600;background:var(--bg-hover)}
.header-badge{
  display:inline-flex;align-items:center;gap:.35rem;
  background:var(--accent-soft);color:var(--accent);
  padding:.25rem .65rem;border-radius:99px;font-size:.72rem;font-weight:600;
  letter-spacing:.02em;
}
.header-badge::before{content:'';width:6px;height:6px;background:var(--green);border-radius:50%;animation:pulse 2s infinite}

/*── Container ────────────────────────────────────────────────────*/
.container{max-width:1200px;margin:0 auto;padding:2rem 2.5rem;transition:opacity .25s ease,transform .25s ease}
@media(max-width:768px){.container{padding:1rem .75rem}}

/*── Breadcrumbs ──────────────────────────────────────────────────*/
.breadcrumb{display:flex;align-items:center;gap:.35rem;margin-bottom:1.25rem;font-size:.875rem;flex-wrap:wrap}
.breadcrumb a{font-weight:500}
.breadcrumb a:hover{text-decoration:underline}
.breadcrumb .sep{color:var(--text-tertiary);font-weight:400;margin:0 .15rem;font-size:.85em}
.breadcrumb .current{color:var(--text);font-weight:600}

/*── Search ───────────────────────────────────────────────────────*/
.search-wrapper{position:relative;margin-bottom:1.75rem}
.search-wrapper svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--text-tertiary);width:18px;height:18px;pointer-events:none}
.search-input{
  width:100%;
  background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);
  padding:.7rem .7rem .7rem 2.6rem;
  color:var(--text);font-size:.9rem;font-family:var(--font-sans);
  transition:all var(--transition);
}
.search-input::placeholder{color:var(--text-tertiary)}
.search-input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);background:var(--bg-elevated)}
.search-kbd{
  position:absolute;right:12px;top:50%;transform:translateY(-50%);
  font-family:var(--font-mono);font-size:.72rem;color:var(--text-tertiary);
  background:var(--bg-elevated);border:1px solid var(--border);border-radius:4px;
  padding:.1rem .4rem;pointer-events:none;line-height:1.4;
}
.search-input:focus ~ .search-kbd{display:none}

/*── Repo Cards (Home Grid) ───────────────────────────────────────*/
.repo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:.75rem}
.repo-card{
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);
  padding:1.25rem;cursor:pointer;
  transition:all .2s ease;position:relative;overflow:hidden;
}
.repo-card::before{
  display:none;
}
.repo-card:hover{
  border-color:var(--accent);
  box-shadow:var(--shadow);
  transform:none;
  background:var(--bg-elevated);
}
.repo-card:hover::before{opacity:1}
.repo-card h3{
  display:flex;align-items:center;gap:.65rem;font-size:1rem;font-weight:600;margin-bottom:.5rem;
}
.repo-icon{
  width:36px;height:36px;border-radius:var(--radius);
  display:flex;align-items:center;justify-content:center;
  font-size:15px;font-weight:700;color:#fff;flex-shrink:0;
}
.repo-desc{color:var(--text-secondary);font-size:.85rem;margin-bottom:.85rem;line-height:1.5}
.repo-meta{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-top:.1rem}
.repo-meta .tag{
  display:inline-flex;align-items:center;gap:.3rem;
  color:var(--text-secondary);font-size:.78rem;
}
.repo-meta .tag svg{width:14px;height:14px;opacity:.65}
.repo-meta .tag .avatar{border-radius:50%;vertical-align:middle}

/*── Avatar (Identicon) ───────────────────────────────────────────*/
.avatar{border-radius:50%;vertical-align:middle;flex-shrink:0;box-shadow:0 0 0 1px rgba(0,0,0,.2)}

/*── SVG File Icons ───────────────────────────────────────────────*/
.fi{width:16px;height:16px;flex-shrink:0;vertical-align:middle}
.fi-folder{color:#54aeff}
.fi-file{color:var(--text-secondary)}
.fi-code{color:var(--green)}
.fi-image{color:var(--purple)}
.fi-md{color:var(--orange)}
.fi-lock{color:var(--red)}
.fi-terminal{color:var(--cyan)}
.fi-db{color:var(--orange)}
.fi-gear{color:var(--text-secondary)}

/*── File Table ───────────────────────────────────────────────────*/
.file-table-wrap{
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);
  overflow:hidden;margin-bottom:1rem;
}
.file-table-header{
  display:flex;align-items:center;gap:.6rem;
  padding:.65rem 1rem;border-bottom:2px solid var(--border-subtle);
  background:var(--bg-elevated);font-size:.85rem;flex-wrap:wrap;
  min-height:42px;position:relative;
}
.file-table-header::after{
  display:none;
}
.file-table-header strong{font-weight:600;color:var(--text)}
.file-table-header .commit-msg{
  color:var(--text-secondary);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.file-table-header .time{color:var(--text-tertiary);font-size:.8rem;margin-left:auto;white-space:nowrap}
.file-table-header .commit-sha{
  font-family:var(--font-mono);font-size:.78rem;color:var(--accent);
  background:var(--accent-soft);padding:.15rem .45rem;border-radius:var(--radius-sm);
  white-space:nowrap;
}
.file-table-header .commit-sha:hover{text-decoration:none;background:var(--accent-glow)}

.file-table .row{
  display:flex;align-items:center;gap:.65rem;
  padding:.5rem 1rem;border-bottom:1px solid var(--border-subtle);
  border-left:2px solid transparent;
  color:var(--text);transition:all var(--transition);
  text-decoration:none;font-size:.875rem;
}
.file-table .row:last-child{border-bottom:none}
.file-table .row:hover{background:var(--bg-hover);text-decoration:none;border-left-color:var(--accent)}
.file-table .row .icon{display:flex;align-items:center;flex-shrink:0}
.file-table .row .name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-table .row-parent .icon{color:var(--text-tertiary);font-size:.85rem;font-weight:700;width:16px;text-align:center}
.file-table .row-parent .name{color:var(--text-secondary)}

/*── Ref Selector ─────────────────────────────────────────────────*/
.ref-selector{position:relative;display:inline-flex}
.ref-btn{
  display:inline-flex;align-items:center;gap:.4rem;
  padding:.4rem .85rem;font-size:.85rem;font-weight:500;
  background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);
  color:var(--text);cursor:pointer;transition:all var(--transition);
  font-family:var(--font-sans);
}
.ref-btn:hover{border-color:var(--text-tertiary);background:var(--bg-elevated)}
.ref-btn.open{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.ref-btn svg{width:16px;height:16px;color:var(--text-secondary)}
.ref-btn svg:last-child{width:12px;height:12px;transition:transform var(--transition)}
.ref-btn.open svg:last-child{transform:rotate(180deg)}

.ref-dropdown{
  position:absolute;top:calc(100% + 6px);left:0;z-index:90;
  min-width:260px;max-height:320px;overflow-y:auto;
  background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg);
  animation:slideDown .15s ease-out;
}
.ref-search{padding:.5rem;border-bottom:1px solid var(--border-subtle)}
.ref-search input{
  width:100%;padding:.4rem .65rem;font-size:.82rem;
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);
  color:var(--text);font-family:var(--font-sans);
}
.ref-search input:focus{outline:none;border-color:var(--accent)}
.ref-search input::placeholder{color:var(--text-tertiary)}
.ref-label{
  padding:.5rem .75rem .35rem;font-size:.72rem;font-weight:600;
  color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.05em;
  background:var(--bg-card);border-bottom:1px solid var(--border-subtle);
  border-top:1px solid var(--border-subtle);
}
.ref-author-label{
  padding:.35rem .75rem;font-size:.72rem;font-weight:600;
  color:var(--purple);letter-spacing:.02em;
  display:flex;align-items:center;gap:.35rem;
  border-bottom:1px solid var(--border-subtle);background:var(--purple-soft);
}
.ref-author-label .avatar{margin-right:.15rem}
.ref-item{
  padding:.4rem .75rem;font-size:.83rem;color:var(--text-secondary);
  cursor:pointer;transition:all var(--transition);display:flex;align-items:center;gap:.4rem;
}
.ref-item:hover{background:var(--bg-hover);color:var(--text)}
.ref-item.active{background:var(--accent-soft);color:var(--accent);font-weight:500}
.ref-item svg{width:14px;height:14px;opacity:.6}

/*── Activity Dots (shared vocabulary) ────────────────────────────*/
.ref-dot{
  width:8px;height:8px;border-radius:50%;flex-shrink:0;
  display:inline-block;margin-right:4px;vertical-align:middle;
}
.ref-dot-green{background:var(--green);box-shadow:0 0 6px rgba(63,185,80,.4)}
.ref-dot-yellow{background:var(--orange);opacity:.85}
.ref-dot-dim{background:var(--text-tertiary);opacity:.35}
.ref-dot-pulse{animation:dot-pulse 2s ease-in-out infinite}
@keyframes dot-pulse{
  0%,100%{box-shadow:0 0 4px rgba(63,185,80,.3)}
  50%{box-shadow:0 0 10px rgba(63,185,80,.6)}
}
.ref-legend{
  display:flex;align-items:center;gap:6px;
  padding:6px 12px;margin-top:4px;
  font-size:.65rem;color:var(--text-tertiary);
  border-top:1px solid var(--border);
}
.ref-legend .ref-dot{width:6px;height:6px;margin-right:2px}
/* Repo card dots */
.repo-dot{
  width:8px;height:8px;border-radius:50%;flex-shrink:0;
  display:inline-block;margin-right:5px;vertical-align:middle;
}
.repo-dot-green{background:var(--green);box-shadow:0 0 6px rgba(63,185,80,.35)}
.repo-dot-yellow{background:var(--orange);opacity:.8}
.repo-dot-dim{background:var(--text-tertiary);opacity:.3}
/* Sidebar about dots */
.about-dot{
  width:9px;height:9px;border-radius:50%;flex-shrink:0;
  display:inline-block;margin-right:5px;vertical-align:middle;
}
.about-dot-green{background:var(--green);box-shadow:0 0 8px rgba(63,185,80,.4)}
.about-dot-yellow{background:var(--orange)}
.about-dot-dim{background:var(--text-tertiary);opacity:.5}
.about-dot-pulse{animation:dot-pulse 2s ease-in-out infinite}
.about-activity{display:flex;align-items:center;font-weight:500}

/*── Stats Bar ────────────────────────────────────────────────────*/
.stats-bar{
  display:flex;align-items:center;gap:.5rem;margin-bottom:1.25rem;flex-wrap:wrap;
  position:relative;
}
.stat-item{
  display:inline-flex;align-items:center;gap:.35rem;
  font-size:.82rem;color:var(--text-secondary);
  padding:.3rem .7rem;border-radius:99px;
  border:1px solid var(--border-subtle);
  background:var(--bg-card);
  transition:all var(--transition);text-decoration:none;
}
.stat-item:hover{border-color:var(--border);color:var(--text);text-decoration:none}
a.stat-item:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
.stat-item svg{width:14px;height:14px;opacity:.65}
.stat-item strong{font-weight:600;color:var(--text)}
/* snapshot-badge and pulse-glow removed */

.clone-btn{
  display:inline-flex;align-items:center;gap:.35rem;
  margin-left:auto;
  padding:.35rem .75rem;font-size:.82rem;font-weight:500;
  background:var(--green-soft);color:var(--green);
  border:1px solid rgba(63,185,80,.3);border-radius:var(--radius);
  cursor:pointer;transition:all var(--transition);
  font-family:var(--font-sans);
}
.clone-btn:hover{background:rgba(63,185,80,.2);border-color:var(--green)}
.clone-btn svg{width:14px;height:14px}

.clone-popup{
  position:absolute;top:calc(100% + 8px);right:0;z-index:80;
  width:380px;max-width:90vw;
  background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg);animation:slideDown .15s ease-out;
}
.clone-popup-header{
  padding:.65rem .85rem;font-size:.85rem;font-weight:600;
  border-bottom:1px solid var(--border-subtle);
}
.clone-popup-row{padding:.65rem .85rem;border-bottom:1px solid var(--border-subtle)}
.clone-popup-row:last-child{border-bottom:none}
.clone-popup-row label{
  display:block;font-size:.72rem;font-weight:600;color:var(--text-tertiary);
  text-transform:uppercase;letter-spacing:.04em;margin-bottom:.35rem;
}
.clone-url-wrap{display:flex;gap:.35rem}
.clone-url{
  flex:1;background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);
  padding:.3rem .55rem;font-family:var(--font-mono);font-size:.78rem;color:var(--text);
  min-width:0;
}
.btn-copy{
  display:inline-flex;align-items:center;justify-content:center;
  width:32px;height:32px;flex-shrink:0;
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);
  color:var(--text-secondary);cursor:pointer;transition:all var(--transition);
  font-family:var(--font-sans);font-size:.8rem;padding:0;
}
.btn-copy:hover{background:var(--bg-hover);color:var(--text);border-color:var(--border)}
.btn-copy svg{width:14px;height:14px}
.btn-copy-success{
  background:var(--green-soft) !important;color:var(--green) !important;
  border-color:var(--green) !important;
  animation:copyPop .3s ease-out;
}
@keyframes copyPop{
  0%{transform:scale(1)}
  40%{transform:scale(1.2)}
  100%{transform:scale(1)}
}
.clone-url-copied{
  animation:copiedFlash .4s ease-out;
}
.clone-url-copied .clone-url{
  border-color:var(--green);
  box-shadow:0 0 0 2px rgba(63,185,80,.15);
  transition:border-color .2s,box-shadow .2s;
}
@keyframes copiedFlash{
  0%{opacity:1}
  30%{opacity:.85}
  100%{opacity:1}
}
.clone-popup-row label code{
  background:var(--bg-elevated);padding:.1rem .35rem;border-radius:3px;
  font-size:.75rem;font-family:var(--font-mono);color:var(--accent);
}

/*── Blob Viewer ──────────────────────────────────────────────────*/
.blob-viewer{
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);
  overflow:hidden;
}
.blob-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:.65rem 1rem;border-bottom:1px solid var(--border-subtle);
  background:var(--bg-elevated);gap:.75rem;flex-wrap:wrap;
}
.blob-info{display:flex;align-items:center;gap:.6rem;font-size:.85rem;min-width:0}
.blob-info strong{font-weight:600;color:var(--text);white-space:nowrap}
.blob-meta{color:var(--text-tertiary);font-size:.78rem;font-family:var(--font-mono);white-space:nowrap}
.blob-actions{display:flex;gap:.35rem;flex-shrink:0}
.btn-small{
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);
  padding:.3rem .6rem;cursor:pointer;color:var(--text-secondary);font-size:.78rem;
  display:inline-flex;align-items:center;gap:.3rem;
  transition:all var(--transition);font-family:var(--font-sans);
}
.btn-small:hover{color:var(--text);border-color:var(--accent);background:var(--accent-soft)}
.btn-small svg{width:14px;height:14px}

.blob-code{overflow-x:auto;overflow-y:visible}
.blob-code .code-table{border-collapse:collapse;width:100%;table-layout:auto}
.blob-code .code-table tr{transition:background var(--transition)}
.blob-code .code-line{border:none}
.blob-code .code-line:hover{background:var(--bg-hover)}
.blob-code .code-line.highlighted{background:var(--accent-soft)}

.blob-code .line-num{
  color:var(--text-tertiary);text-align:right;user-select:none;
  width:1%;white-space:nowrap;
  padding:0 .85rem 0 1rem;
  border-right:1px solid var(--border-subtle);
  cursor:pointer;font-family:var(--font-mono);font-size:.8rem;line-height:1.65;
  vertical-align:top;
}
.blob-code .line-num::before{content:attr(data-num)}
.blob-code .line-num:hover{color:var(--accent)}
.blob-code .code-line.highlighted .line-num{color:var(--accent)}

.blob-code .line-code{
  padding:0 1rem;font-family:var(--font-mono);font-size:.8rem;line-height:1.65;
  white-space:pre;vertical-align:top;tab-size:4;
}
.blob-code .line-code pre{margin:0;padding:0;background:none;border:none;font:inherit;white-space:pre;tab-size:inherit}

/*── Blob Search ──────────────────────────────────────────────────*/
.blob-search-bar{
  display:flex;align-items:center;gap:.65rem;
  padding:.45rem 1rem;border-bottom:1px solid var(--border-subtle);
  background:var(--bg-card);animation:slideDown .15s ease-out;
}
.blob-search-bar .search-input{flex:1;max-width:300px}

/*── Raw blob view ────────────────────────────────────────────────*/
.raw-blob{padding:1rem;font-family:var(--font-mono);font-size:.82rem;white-space:pre-wrap;word-break:break-all;line-height:1.6}

/*── Image Preview ────────────────────────────────────────────────*/
.image-preview{
  padding:2rem;display:flex;align-items:center;justify-content:center;
  background:repeating-conic-gradient(var(--bg-elevated) 0% 25%, var(--bg-card) 0% 50%) 50% / 20px 20px;
  min-height:200px;
}

/*── Syntax Highlighting (inline styles used, keeping backup classes) ──*/
.tok-kw{color:#ff7b72}.tok-type{color:#79c0ff}.tok-str{color:#a5d6ff}
.tok-comment{color:#8b949e;font-style:italic}.tok-num{color:#79c0ff}
.tok-fn{color:#d2a8ff}.tok-regex{color:#7ee787}

/*── Commit List ──────────────────────────────────────────────────*/
.commit-group{margin-bottom:1.25rem}
.commit-date-label{
  font-size:.82rem;font-weight:600;color:var(--text-secondary);
  padding:.5rem 0;border-bottom:1px solid var(--border-subtle);margin-bottom:.25rem;
}
.commit-item{
  display:flex;align-items:flex-start;gap:.75rem;
  padding:.7rem .5rem;border-bottom:1px solid var(--border-subtle);
  border-left:2px solid transparent;border-radius:var(--radius-sm);
  transition:all var(--transition);margin:0 -.5rem;
}
.commit-item:last-child{border-bottom:none}
.commit-item:hover{background:var(--bg-hover);border-left-color:var(--accent)}
.commit-item .avatar-col{flex-shrink:0;padding-top:.1rem}
.commit-item .info{flex:1;min-width:0}
.commit-item .msg{font-weight:600;font-size:.9rem;margin-bottom:.15rem;word-break:break-word}
a.commit-msg-link{color:var(--text);text-decoration:none;display:block}
a.commit-msg-link:hover{color:var(--accent);text-decoration:underline}
.commit-item .author{font-size:.78rem;color:var(--text-secondary)}
.commit-item .author strong{color:var(--text);font-weight:500}
.commit-item .sha-col{flex-shrink:0;align-self:center}
.commit-sha{
  font-family:var(--font-mono);font-size:.75rem;color:var(--accent);
  background:var(--accent-soft);padding:.2rem .5rem;border-radius:var(--radius-sm);
  white-space:nowrap;border:1px solid transparent;
  cursor:pointer;transition:all var(--transition);
}
button.commit-sha{font-family:var(--font-mono);font-size:.75rem}
.commit-sha:hover{background:var(--accent-glow);border-color:var(--accent)}

/*── README ───────────────────────────────────────────────────────*/
.readme-box{
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);
  overflow:hidden;margin-top:1rem;
}
.readme-header{
  display:flex;align-items:center;gap:.5rem;
  padding:.65rem 1rem;border-bottom:1px solid var(--border-subtle);
  font-size:.85rem;font-weight:600;background:var(--bg-elevated);
}
.readme-header svg{width:16px;height:16px}
.readme-body{padding:1.25rem 1.5rem;font-size:.9rem;line-height:1.7}
.readme-body.markdown h1{font-size:1.5rem;font-weight:700;margin:1.25rem 0 .75rem;padding-bottom:.5rem;border-bottom:1px solid var(--border-subtle)}
.readme-body.markdown h2{font-size:1.25rem;font-weight:700;margin:1rem 0 .6rem;padding-bottom:.35rem;border-bottom:1px solid var(--border-subtle)}
.readme-body.markdown h3{font-size:1.05rem;font-weight:600;margin:1rem 0 .5rem}
.readme-body.markdown h4{font-size:.95rem;font-weight:600;margin:.85rem 0 .4rem}
.readme-body.markdown p{margin:.5rem 0;color:var(--text-secondary)}
.readme-body.markdown a{color:var(--accent)}
.readme-body.markdown strong{color:var(--text);font-weight:600}
.readme-body.markdown code{
  background:var(--bg-elevated);padding:.15rem .4rem;border-radius:4px;
  font-size:.85em;font-family:var(--font-mono);color:var(--text);
}
.readme-body.markdown pre{
  background:var(--bg-elevated);border:1px solid var(--border-subtle);border-radius:var(--radius);
  padding:.85rem 1rem;margin:.75rem 0;overflow-x:auto;
}
.readme-body.markdown pre code{background:none;padding:0;font-size:.82rem;line-height:1.65}
.readme-body.markdown ul,.readme-body.markdown ol{margin:.5rem 0 .75rem;padding-left:2rem}
.readme-body.markdown ul{list-style-type:disc}
.readme-body.markdown ol{list-style-type:decimal}
.readme-body.markdown li{margin:.3rem 0;color:var(--text-secondary);line-height:1.6}
.readme-body.markdown li::marker{color:var(--text-tertiary)}
.readme-body.markdown blockquote{
  border-left:3px solid var(--accent);padding:.5rem 1rem;margin:.5rem 0;
  color:var(--text-secondary);background:var(--accent-soft);border-radius:0 var(--radius-sm) var(--radius-sm) 0;
}
.readme-body.markdown hr{border:none;border-top:1px solid var(--border-subtle);margin:1.25rem 0}
.readme-body.markdown table{
  border-collapse:collapse;margin:.75rem 0;width:100%;
}
.readme-body.markdown td,.readme-body.markdown th{
  border:1px solid var(--border-subtle);padding:.4rem .75rem;font-size:.85rem;
}
.readme-body.markdown img{max-width:100%;border-radius:var(--radius)}
.readme-body.markdown del{color:var(--text-tertiary);text-decoration:line-through}

/*── Home: Hero ────────────────────────────────────────────────────*/
.home-hero{
  text-align:center;
  padding:4.5rem 2rem 3rem;
  position:relative;
  border-bottom:1px solid var(--border-subtle);
  margin:-2rem -1.5rem 0;
  background:var(--gradient-subtle);
}
@media(max-width:768px){.home-hero{margin:-1rem -.75rem 0;padding:3rem 1rem 2rem}}
.home-hero-inner{max-width:640px;margin:0 auto}
.hero-wordmark{
  font-size:3.5rem;font-weight:800;
  color:var(--text);letter-spacing:-.06em;
  line-height:1;margin-bottom:.75rem;
  font-family:var(--font-sans);
}
.hero-tagline{
  font-size:1.2rem;font-weight:500;color:var(--text-secondary);
  letter-spacing:-.01em;margin-bottom:.35rem;line-height:1.5;
}
.hero-sub{
  font-size:.9rem;font-weight:400;color:var(--text-tertiary);
  letter-spacing:.01em;margin-bottom:1.5rem;
}
.hero-cta{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}
.hero-btn-primary{
  display:inline-flex;align-items:center;
  padding:.6rem 1.5rem;border-radius:var(--radius);
  background:var(--text);color:var(--bg);
  font-size:.85rem;font-weight:600;letter-spacing:-.01em;
  transition:all var(--transition);text-decoration:none;
}
.hero-btn-primary:hover{opacity:.85;text-decoration:none;color:var(--bg);transform:translateY(-1px)}
.hero-btn-secondary{
  display:inline-flex;align-items:center;
  padding:.6rem 1.5rem;border-radius:var(--radius);
  background:transparent;color:var(--text-secondary);border:1px solid var(--border);
  font-size:.85rem;font-weight:500;letter-spacing:-.01em;
  transition:all var(--transition);text-decoration:none;
}
.hero-btn-secondary:hover{color:var(--text);border-color:var(--text-secondary);text-decoration:none;transform:translateY(-1px)}

/*── Home: Feature Cards ──────────────────────────────────────────*/
.home-features{
  display:grid;grid-template-columns:repeat(3,1fr);gap:1px;
  margin:2.5rem 0;
  border:1px solid var(--border-subtle);border-radius:var(--radius-lg);
  overflow:hidden;background:var(--border-subtle);
}
.feature-card{
  background:var(--bg-card);padding:2rem 1.5rem;
  text-align:left;
}
.feature-icon{
  width:36px;height:36px;
  display:flex;align-items:center;justify-content:center;
  font-size:1.2rem;font-weight:700;color:var(--accent);
  margin-bottom:.75rem;
  background:var(--accent-soft);border-radius:var(--radius);
}
.feature-icon svg{width:18px;height:18px;fill:var(--accent)}
.feature-card h3{font-size:.9rem;font-weight:700;color:var(--text);margin-bottom:.35rem;letter-spacing:-.01em}
.feature-card p{font-size:.8rem;color:var(--text-secondary);line-height:1.55;margin:0}
@media(max-width:768px){
  .home-features{grid-template-columns:1fr}
}

/*── Home: Install Section ────────────────────────────────────────*/
.home-install-section{margin-bottom:2.5rem}
.install-card{
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);
  overflow:hidden;
}
.install-header{
  padding:.75rem 1.25rem;font-size:.8rem;font-weight:700;color:var(--text);
  border-bottom:1px solid var(--border-subtle);
  text-transform:uppercase;letter-spacing:.06em;
}
.install-steps{padding:1.25rem}
.install-step{display:flex;align-items:flex-start;gap:1rem;margin-bottom:1rem}
.install-step:last-child{margin-bottom:0}
.step-num{
  width:24px;height:24px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  font-size:.7rem;font-weight:700;color:var(--accent);
  border:1.5px solid var(--accent);border-radius:50%;
  margin-top:.1rem;
}
.step-content{flex:1;min-width:0}
.step-label{font-size:.8rem;font-weight:600;color:var(--text);margin-bottom:.35rem}
.step-code-wrap{
  display:flex;align-items:stretch;
  background:var(--bg-elevated);border:1px solid var(--border-subtle);border-radius:var(--radius);
  overflow:hidden;
}
.step-code{
  flex:1;padding:.5rem .75rem;
  font-family:var(--font-mono);font-size:.78rem;color:var(--text-secondary);
  white-space:nowrap;overflow-x:auto;min-width:0;
  display:flex;align-items:center;
}
.step-copy{
  flex-shrink:0;padding:.4rem .65rem;
  background:transparent;border:none;border-left:1px solid var(--border-subtle);
  color:var(--text-tertiary);cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:all var(--transition);
}
.step-copy:hover{color:var(--accent);background:var(--accent-soft)}
.step-copy.copied{color:var(--green)}
.step-copy svg{width:14px;height:14px}

/*── Home: Repos Section ──────────────────────────────────────────*/
.home-repos-section{margin-bottom:2rem}
.repos-header{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  margin-bottom:1rem;flex-wrap:wrap;
}
.search-wrapper-inline{
  position:relative;display:flex;align-items:center;
}
.search-wrapper-inline svg{position:absolute;left:10px;color:var(--text-tertiary);width:14px;height:14px;pointer-events:none}
.search-wrapper-inline .search-input{
  padding:.4rem .5rem .4rem 2rem;
  font-size:.8rem;width:200px;
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius);
  color:var(--text);transition:all var(--transition);
}
.search-wrapper-inline .search-input:focus{
  border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft);outline:none;width:260px;
}
.search-wrapper-inline .search-kbd{
  position:absolute;right:8px;
  background:var(--bg-elevated);border:1px solid var(--border-subtle);border-radius:3px;
  color:var(--text-tertiary);font-size:.65rem;font-family:var(--font-mono);
  padding:.05rem .3rem;pointer-events:none;line-height:1.4;
}
.search-wrapper-inline .search-input:focus ~ .search-kbd{display:none}

/*── Section Heading ──────────────────────────────────────────────*/
.section-heading{
  font-size:1.05rem;font-weight:700;color:var(--text);
  margin:0;letter-spacing:-.01em;
}

/*── Home: Top Creators ───────────────────────────────────────────*/
.home-creators-section{margin-bottom:3rem}
.creators-header{display:flex;align-items:baseline;gap:.75rem;margin-bottom:.75rem}
.creators-header .section-heading{margin-bottom:0}
.creators-badge{
  font-size:.72rem;color:var(--text-tertiary);font-weight:500;
  background:var(--bg-elevated);padding:.15rem .55rem;border-radius:99px;
  letter-spacing:.01em;
}
.creators-grid{
  display:flex;flex-direction:column;gap:.5rem;
}
.creators-skeleton{padding:.75rem 1rem}

/* Creator card — full-width row, heatmap right-aligned */
.creator-card{
  display:flex;align-items:center;gap:.75rem;
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);
  padding:.6rem .9rem;
  text-decoration:none;color:var(--text);
  transition:all var(--transition);
  min-height:48px;
}
.creator-card:hover{
  border-color:var(--accent);background:var(--bg-elevated);
  text-decoration:none;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
}
.creator-avatar{flex-shrink:0;line-height:0}
.creator-avatar .avatar{border-radius:50%}
.creator-info{
  display:flex;flex-direction:column;gap:.15rem;
  min-width:0;flex:1;
}
.creator-name{
  font-size:.85rem;font-weight:600;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.creator-stats{
  font-size:.7rem;color:var(--text-tertiary);white-space:nowrap;
  font-family:var(--font-mono);
}
.creator-heat-wrap{
  flex-shrink:0;
  display:flex;align-items:center;
  margin-left:auto;
  padding-left:.5rem;
}

/* ── Heatmap Grid ────────────────────────────────────────────── */
/* Heatmap grid container — subtle recessed "well" */
.heatgrid{
  display:grid;
  width:max-content;
  padding:4px;
  background:rgba(0,0,0,.12);
  border-radius:calc(var(--hc-radius, 3px) + 3px);
  border:1px solid rgba(48,54,61,.18);
  box-shadow:inset 0 1px 3px rgba(0,0,0,.12);
}
.heatgrid-strip{
  padding:3px 5px;
  border-radius:calc(var(--hc-radius, 3px) + 4px);
}
/* Individual heatmap cell */
.hc{
  border-radius:var(--hc-radius, 3px);
  transition:transform .15s ease, background .2s, box-shadow .2s;
  cursor:default;
  aspect-ratio:1;
}
.hc:hover{
  transform:scale(1.35);z-index:2;
  box-shadow:0 0 8px rgba(255,255,255,.12), 0 1px 3px rgba(0,0,0,.3);
  filter:brightness(1.15);
}
/* Level 0 — empty slot */
.hc-0{
  background:rgba(48,54,61,.28);
  border:1px solid rgba(48,54,61,.42);
}
/* Level 1 — light activity */
.hc-1{background:#114b2e;border:1px solid #16593a;box-shadow:inset 0 0 2px rgba(63,185,80,.1)}
/* Level 2 — moderate */
.hc-2{background:#006d32;border:1px solid #008a3f;box-shadow:inset 0 0 2px rgba(63,185,80,.15)}
/* Level 3 — high */
.hc-3{background:#26a641;border:1px solid #2fba4a;box-shadow:inset 0 0 3px rgba(63,185,80,.18)}
/* Level 4 — max */
.hc-4{background:var(--green);border:1px solid var(--green);box-shadow:0 0 6px rgba(63,185,80,.35), inset 0 0 4px rgba(255,255,255,.08)}
/* Glow animation for today's cell */
@keyframes hcGlow{
  0%,100%{box-shadow:0 0 5px rgba(63,185,80,.45), 0 0 2px rgba(63,185,80,.6)}
  50%{box-shadow:0 0 14px rgba(63,185,80,.55), 0 0 5px rgba(63,185,80,.75)}
}
.hc-glow{
  animation:hcGlow 2.2s ease-in-out infinite;
  border-color:rgba(63,185,80,.6) !important;
}
[data-theme="light"] .heatgrid{background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.08);box-shadow:inset 0 1px 2px rgba(0,0,0,.05)}
[data-theme="light"] .hc-0{background:rgba(0,0,0,.07);border-color:rgba(0,0,0,.12)}
[data-theme="light"] .hc-1{background:#9be9a8;border-color:#88d699}
[data-theme="light"] .hc-2{background:#40c463;border-color:#36b358}
[data-theme="light"] .hc-3{background:#30a14e;border-color:#289243}
[data-theme="light"] .hc-4{background:#216e39;border-color:#1a5f30}
.repo-heat-inline{
  display:inline-flex;align-items:center;margin-right:4px;
}

/*── Repo Card layout — REPO / ADDR / BRANCH format ──────────────*/
.repo-card-top{display:flex;align-items:center;gap:.65rem;margin-bottom:.65rem}
.repo-card-info{min-width:0}
.repo-card-info h3{font-size:1rem;font-weight:600;margin:0}
.repo-card-info h3 a{color:var(--accent)}
.repo-card-info h3 a:hover{text-decoration:underline}
.repo-owner{font-size:.72rem;color:var(--text-tertiary);display:flex;align-items:center;gap:.3rem;margin-top:.15rem}
.repo-owner .avatar{border-radius:50%}

.repo-card-header{display:flex;align-items:center;gap:.75rem;margin-bottom:.5rem;min-width:0}
.repo-avatar-wrap{flex-shrink:0;line-height:0}
.repo-avatar-wrap .avatar{border-radius:50%}
.repo-card-title{
  display:flex;flex-direction:column;gap:.1rem;min-width:0;
}
.repo-name{font-weight:700;font-size:1rem;color:var(--text);line-height:1.3}
.repo-separator{color:var(--text-tertiary);font-weight:400}
.repo-owner-link{
  color:var(--text-secondary);font-size:.78rem;font-family:var(--font-mono);
  text-decoration:none;transition:color var(--transition);line-height:1.3;
}
.repo-owner-link:hover{color:var(--accent);text-decoration:underline}
.repo-branch{
  display:inline-flex;align-items:center;gap:.25rem;
  font-size:.78rem;color:var(--text-tertiary);font-family:var(--font-mono);
}
.repo-branch svg{width:12px;height:12px;opacity:.6}
.repo-branch-badge{
  display:inline-flex;align-items:center;gap:.3rem;
  font-size:.75rem;color:var(--text-secondary);font-family:var(--font-mono);
  background:var(--bg-elevated);padding:.2rem .55rem;border-radius:10px;
  border:1px solid var(--border-subtle);
}
.repo-branch-badge svg{width:12px;height:12px;opacity:.7}
.branch-extra{color:var(--text-tertiary);font-size:.7rem}
.repo-card-meta{
  display:flex;align-items:center;justify-content:space-between;gap:.75rem;font-size:.78rem;color:var(--text-secondary);
}
.repo-meta-right{display:flex;align-items:center;gap:.6rem}
.repo-star-count{
  display:inline-flex;align-items:center;gap:.3rem;
  color:var(--orange);font-weight:600;
}
.repo-star-count svg{width:13px;height:13px}
.repo-time{color:var(--text-tertiary)}

/*── Breadcrumb owner segment ─────────────────────────────────────*/
.breadcrumb-owner{color:var(--text-secondary);font-family:var(--font-mono);font-size:.85rem}

/*── Repo Carousel ────────────────────────────────────────────────*/
.repo-carousel{
  position:relative;overflow-x:auto;overflow-y:hidden;
  margin:0 -1rem;padding:0 1rem .75rem;
  scrollbar-width:thin;scrollbar-color:var(--border) transparent;
  -webkit-overflow-scrolling:touch;
  mask-image:linear-gradient(to right,transparent 0,#000 1rem,#000 calc(100% - 1rem),transparent 100%);
  -webkit-mask-image:linear-gradient(to right,transparent 0,#000 1rem,#000 calc(100% - 1rem),transparent 100%);
}
.repo-carousel::-webkit-scrollbar{height:4px}
.repo-carousel::-webkit-scrollbar-track{background:transparent}
.repo-carousel::-webkit-scrollbar-thumb{background:var(--border);border-radius:99px}
.carousel-track{
  display:flex;gap:.75rem;
  animation:fadeIn .4s ease-out both;
}
.carousel-card{
  flex:0 0 180px;
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);
  padding:1rem;cursor:pointer;
  transition:all var(--transition);
  display:flex;flex-direction:column;align-items:center;text-align:center;
  gap:.5rem;
}
.carousel-card:hover{
  border-color:var(--accent);background:var(--bg-hover);
  transform:translateY(-2px);box-shadow:var(--shadow);
}
.carousel-icon{
  width:42px;height:42px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  font-size:18px;font-weight:800;color:#fff;
  flex-shrink:0;
}
.carousel-name{
  font-size:.85rem;font-weight:700;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:100%;
}
.carousel-meta{
  font-size:.72rem;color:var(--text-secondary);
  display:flex;align-items:center;gap:.3rem;
  white-space:nowrap;
}
.carousel-meta svg{width:12px;height:12px;opacity:.6}

/*── Empty & Error States ─────────────────────────────────────────*/
.empty-state,.error-state{
  text-align:center;padding:3.5rem 1.5rem;color:var(--text-secondary);
  border:1px dashed var(--border-subtle);border-radius:var(--radius-lg);
  background:var(--bg-card);margin:1rem 0;
}
.empty-state .icon,.error-state .icon{font-size:3rem;margin-bottom:1rem;filter:grayscale(.2)}
.empty-state h3,.error-state h3{
  font-size:1.15rem;font-weight:600;color:var(--text);margin-bottom:.5rem;
}
.empty-state p,.error-state p{font-size:.9rem;line-height:1.6;max-width:400px;margin:0 auto}
.empty-code{
  background:var(--bg-elevated);border:1px solid var(--border-subtle);border-radius:var(--radius);
  padding:.75rem 1rem;margin:.75rem auto 0;max-width:420px;text-align:left;
  font-family:var(--font-mono);font-size:.8rem;line-height:1.6;color:var(--text-secondary);
  white-space:pre;overflow-x:auto;
}

/*── Toast ────────────────────────────────────────────────────────*/
#toastContainer{position:fixed;bottom:1.5rem;right:1.5rem;z-index:1000;display:flex;flex-direction:column;gap:.5rem}
.toast{
  background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius);
  padding:.65rem 1rem;font-size:.82rem;color:var(--text);
  box-shadow:var(--shadow-lg);
  animation:slideDown .25s ease-out;transition:opacity .3s ease;
  max-width:320px;
}
.toast.error{border-color:var(--red);background:var(--red-soft)}
.toast.success{border-color:var(--green);background:var(--green-soft)}

/*── Footer ───────────────────────────────────────────────────────*/
footer{
  margin-top:auto;
  border-top:1px solid var(--border-subtle);
  padding:1.5rem;text-align:center;
  font-size:.78rem;color:var(--text-tertiary);
  background:var(--bg-card);
}
footer a{color:var(--text-secondary);transition:color var(--transition)}
footer a:hover{color:var(--accent);text-decoration:none}
footer .footer-inner{
  max-width:1100px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  flex-wrap:wrap;
}
footer .footer-links{display:flex;gap:1rem}

/*── Repo Layout (2-column) ────────────────────────────────────────*/
.repo-layout{display:grid;grid-template-columns:1fr 260px;gap:1.25rem;align-items:start}
.repo-main{min-width:0}
.repo-sidebar{position:sticky;top:calc(var(--header-height) + 1rem)}
@media(max-width:900px){
  .repo-layout{grid-template-columns:1fr}
  .repo-sidebar{position:static}
}

/*── About Box (Sidebar) ──────────────────────────────────────────*/
.about-box{
  background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:var(--radius-lg);
  overflow:hidden;
}
.about-header{
  padding:.6rem .85rem;font-size:.82rem;font-weight:600;
  border-bottom:1px solid var(--border-subtle);background:var(--bg-elevated);
}
.about-row{
  display:flex;justify-content:space-between;align-items:center;
  padding:.45rem .85rem;font-size:.8rem;
  border-bottom:1px solid var(--border-subtle);
}
.about-row:last-child{border-bottom:none}
.about-label{color:var(--text-tertiary);font-weight:500}
.about-value{color:var(--text-secondary);display:flex;align-items:center;gap:.35rem;font-family:var(--font-mono);font-size:.78rem}
.about-languages{padding:.65rem .85rem;border-bottom:1px solid var(--border-subtle)}
.lang-bar{display:flex;gap:2px;border-radius:4px;overflow:hidden;margin-bottom:.5rem}
.lang-labels{display:flex;flex-wrap:wrap;gap:.4rem}
.lang-label{display:inline-flex;align-items:center;gap:.3rem;font-size:.72rem;color:var(--text-secondary)}
.lang-label small{color:var(--text-tertiary)}
.lang-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}

/*── Page Heading ──────────────────────────────────────────────────*/
.page-heading{
  display:flex;align-items:center;gap:.75rem;margin-bottom:1.25rem;flex-wrap:wrap;
}
.page-heading h2{
  font-size:1.25rem;font-weight:700;display:flex;align-items:center;gap:.5rem;margin:0;
}
.page-heading h2 svg{width:20px;height:20px;color:var(--text-secondary)}
.count-badge{
  font-size:.75rem;font-weight:600;color:var(--text-secondary);
  background:var(--bg-elevated);border:1px solid var(--border-subtle);
  padding:.15rem .55rem;border-radius:99px;
}

/*── Misc ─────────────────────────────────────────────────────────*/
.tag svg{vertical-align:middle}

/*── Responsive ───────────────────────────────────────────────────*/
@media(max-width:768px){
  .hero-wordmark{font-size:2.2rem}
  .hero-tagline{font-size:1rem}
  .hero-sub{font-size:.82rem}
  .repo-grid{grid-template-columns:1fr}
  .repos-header{flex-direction:column;align-items:stretch}
  .search-wrapper-inline .search-input{width:100%}
  .search-wrapper-inline .search-input:focus{width:100%}
  .search-wrapper-inline{width:100%}
  .file-table-header{font-size:.8rem}
  .file-table-header .commit-msg{display:none}
  .blob-header{flex-direction:column;align-items:flex-start;gap:.5rem}
  .stats-bar{gap:.35rem}
  .stat-item{font-size:.75rem;padding:.25rem .5rem}
  .breadcrumb{font-size:.8rem}
  .commit-item{gap:.5rem;padding:.55rem 0}
  .commit-item .msg{font-size:.85rem}
  footer .footer-inner{flex-direction:column;gap:.5rem}
}
@media(max-width:480px){
  header{padding:0 .75rem;gap:.5rem}
  header .logo span{display:none}
  .container{padding:.75rem .5rem}
  .ref-dropdown{min-width:200px}
  .blob-code .line-num{padding:0 .35rem 0 .4rem;font-size:.7rem}
  .blob-code .line-code{padding:0 .4rem;font-size:.7rem}
  .carousel-card{flex:0 0 150px;padding:.75rem}
  .repo-grid{grid-template-columns:1fr}
  .repo-card{padding:1rem}
  .readme-body{padding:.85rem 1rem;font-size:.85rem}
  #toastContainer{bottom:.75rem;right:.75rem;left:.75rem}
  .toast{max-width:none}
}

/*── Light Theme ──────────────────────────────────────────────────*/
[data-theme="light"]{
  --bg:#FAFAFA;--bg-card:#FFFFFF;--bg-elevated:#F3F4F6;--bg-hover:#E5E7EB;
  --bg-glass:#FAFAFA;--border:rgba(209,213,219,.8);--border-subtle:rgba(209,213,219,.5);
  --text:#111827;--text-secondary:#6B7280;--text-tertiary:#9CA3AF;
  --accent:#2563EB;--accent-soft:rgba(37,99,235,.08);--accent-glow:rgba(37,99,235,.12);
  --green:#16A34A;--green-soft:rgba(22,163,74,.08);
  --red:#DC2626;--red-soft:rgba(220,38,38,.08);
  --orange:#D97706;--purple:#7C3AED;--purple-soft:rgba(124,58,237,.08);
  --cyan:#2563EB;
  --gradient-accent:linear-gradient(135deg,#2563EB,#7C3AED);
  --gradient-subtle:none;
  --shadow-sm:0 1px 2px rgba(0,0,0,.05);--shadow:0 1px 3px rgba(0,0,0,.1);--shadow-lg:0 4px 12px rgba(0,0,0,.08);
}
[data-theme="light"] ::selection{background:var(--accent-soft);color:var(--accent)}
[data-theme="light"] ::-webkit-scrollbar-thumb{background:var(--border)}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover{background:var(--text-tertiary)}
[data-theme="light"] .logo-icon{box-shadow:none}
[data-theme="light"] .skeleton{background:linear-gradient(90deg,var(--bg-elevated) 25%,var(--bg-hover) 50%,var(--bg-elevated) 75%);background-size:200% 100%}
[data-theme="light"] .header-badge{background:var(--accent-soft);color:var(--accent)}
[data-theme="light"] .commit-sha{background:var(--bg-elevated);color:var(--accent)}
[data-theme="light"] .blob-code .line-num{color:var(--text-tertiary);border-right-color:var(--border)}
[data-theme="light"] .blob-code .line-code{color:var(--text)}
[data-theme="light"] .file-table .row:hover{background:var(--bg-hover)}
[data-theme="light"] .repo-card{background:var(--bg-card);border-color:var(--border)}
[data-theme="light"] .repo-card:hover{border-color:var(--accent);background:var(--bg-elevated)}
[data-theme="light"] .hero-btn-primary{background:var(--text);color:var(--bg)}
[data-theme="light"] .feature-card{background:var(--bg-card)}
[data-theme="light"] .install-card{background:var(--bg-card)}
[data-theme="light"] .step-code-wrap{background:var(--bg-elevated)}
[data-theme="light"] footer{background:var(--bg-card);border-top-color:var(--border)}
[data-theme="light"] .toast{background:var(--bg-card);color:var(--text);border:1px solid var(--border)}
[data-theme="light"] .diff-line-add .diff-code{background:rgba(26,127,55,.1);color:var(--text)}
[data-theme="light"] .diff-line-del .diff-code{background:rgba(207,34,46,.1);color:var(--text)}

/*── Theme Toggle ─────────────────────────────────────────────────*/
.theme-toggle{
  background:none;border:none;color:var(--text-secondary);cursor:pointer;
  padding:6px;border-radius:var(--radius);display:flex;align-items:center;
  justify-content:center;transition:all var(--transition);min-width:44px;min-height:44px;
}
.theme-toggle:hover{color:var(--text);background:var(--bg-hover)}
.theme-toggle svg{width:18px;height:18px}

/*── Hamburger Menu ───────────────────────────────────────────────*/
.hamburger{
  display:none;background:none;border:none;color:var(--text-secondary);cursor:pointer;
  padding:8px;border-radius:var(--radius);min-width:44px;min-height:44px;
  align-items:center;justify-content:center;transition:all var(--transition);
}
.hamburger:hover{color:var(--text);background:var(--bg-hover)}

/*── Diff Page ────────────────────────────────────────────────────*/
.diff-page{max-width:1100px;margin:0 auto}
.diff-breadcrumb{display:flex;align-items:center;gap:.4rem;font-size:.85rem;margin-bottom:1rem;flex-wrap:wrap}
.diff-breadcrumb .sep{color:var(--text-tertiary)}
.diff-breadcrumb .current{color:var(--text-secondary);font-family:var(--font-mono);font-size:.8rem}

.diff-header{margin-bottom:1.5rem}
.diff-subject{font-size:1.4rem;font-weight:700;line-height:1.4;margin-bottom:.5rem}
.diff-body{
  font-family:var(--font-mono);font-size:.8rem;color:var(--text-secondary);
  padding:.75rem 1rem;background:var(--bg-card);border:1px solid var(--border-subtle);
  border-radius:var(--radius);margin:.75rem 0;white-space:pre-wrap;
  overflow-x:auto;max-height:200px;
}
.diff-meta{
  display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--text-secondary);
  flex-wrap:wrap;
}
.diff-meta img.avatar{border-radius:50%;vertical-align:middle}
.diff-sha{
  font-family:var(--font-mono);font-size:.75rem;background:var(--bg-elevated);
  padding:.15rem .5rem;border-radius:var(--radius-sm);cursor:pointer;
  color:var(--accent);border:1px solid var(--border-subtle);
  transition:all var(--transition);
}
.diff-sha:hover{background:var(--accent-soft);border-color:var(--accent)}
.diff-parent{font-size:.8rem;color:var(--text-tertiary)}
.diff-parent a{font-family:var(--font-mono);font-size:.75rem}

.diff-stats-bar{
  display:flex;align-items:center;gap:.75rem;padding:.65rem 1rem;
  background:var(--bg-card);border:1px solid var(--border-subtle);
  border-radius:var(--radius);margin-bottom:1rem;flex-wrap:wrap;
}
.diff-stat-files{display:flex;align-items:center;gap:.35rem;font-size:.85rem}
.diff-stat-files svg{width:14px;height:14px}
.diff-stat-add{color:var(--green);font-weight:600;font-size:.85rem}
.diff-stat-del{color:var(--red);font-weight:600;font-size:.85rem}
.diff-stat-bar{display:flex;gap:2px;margin-left:.5rem}
.diff-stat-bar .block{width:8px;height:8px;border-radius:2px}
.diff-stat-bar .block.add{background:var(--green)}
.diff-stat-bar .block.del{background:var(--red)}
.diff-expand-all{margin-left:auto;font-size:.75rem;min-height:34px}

.diff-file-toc{
  background:var(--bg-card);border:1px solid var(--border-subtle);
  border-radius:var(--radius);margin-bottom:1.5rem;padding:.75rem 1rem;
}
.diff-file-toc h3{font-size:.85rem;font-weight:600;margin-bottom:.5rem;color:var(--text-secondary)}
.diff-file-toc ul{list-style:none;display:flex;flex-direction:column;gap:.25rem}
.diff-file-toc li{display:flex;align-items:center;gap:.5rem;font-size:.82rem}
.diff-toc-status{
  display:inline-flex;align-items:center;justify-content:center;
  width:20px;height:20px;border-radius:4px;font-weight:700;font-size:.7rem;
  flex-shrink:0;
}
.diff-toc-added{background:var(--green-soft);color:var(--green)}
.diff-toc-deleted{background:var(--red-soft);color:var(--red)}
.diff-toc-modified{background:var(--accent-soft);color:var(--accent)}
.diff-toc-path{font-family:var(--font-mono);font-size:.78rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.diff-toc-stats{margin-left:auto;font-family:var(--font-mono);font-size:.72rem;white-space:nowrap}
.diff-toc-stats .add{color:var(--green)}
.diff-toc-stats .del{color:var(--red)}
.diff-toc-stats.binary{color:var(--text-tertiary)}

.diff-file{
  background:var(--bg-card);border:1px solid var(--border-subtle);
  border-radius:var(--radius);margin-bottom:1rem;overflow:hidden;
}
.diff-file-header{
  display:flex;align-items:center;gap:.5rem;padding:.55rem .85rem;
  background:var(--bg-elevated);border-bottom:1px solid var(--border-subtle);
  cursor:pointer;user-select:none;transition:background var(--transition);
  min-height:44px;
}
.diff-file-header:hover{background:var(--bg-hover)}
.diff-file-chevron{display:flex;transition:transform .2s ease}
.diff-file-chevron svg{width:14px;height:14px}
.diff-file-chevron.collapsed{transform:rotate(-90deg)}
.diff-file-status{
  display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;border-radius:4px;font-weight:700;font-size:.7rem;
  flex-shrink:0;
}
.diff-status-added{background:var(--green-soft);color:var(--green)}
.diff-status-deleted{background:var(--red-soft);color:var(--red)}
.diff-status-modified{background:var(--accent-soft);color:var(--accent)}
.diff-file-path{flex:1;font-family:var(--font-mono);font-size:.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.diff-file-path a{color:var(--text)}
.diff-file-path a:hover{color:var(--accent)}
.diff-file-stats{font-family:var(--font-mono);font-size:.72rem;white-space:nowrap}
.diff-file-stats .add{color:var(--green)}
.diff-file-stats .del{color:var(--red)}

.diff-file-content{overflow-x:auto}
.diff-table{width:100%;border-collapse:collapse;font-family:var(--font-mono);font-size:.78rem;line-height:1.5}
.diff-table td{padding:0;vertical-align:top}
.diff-ln{
  width:44px;min-width:44px;text-align:right;padding:0 8px!important;
  color:var(--text-tertiary);font-size:.72rem;user-select:none;
  border-right:1px solid var(--border-subtle);
}
.diff-code{padding:0 12px!important;white-space:pre-wrap;word-break:break-all}
.diff-code.add{background:var(--green-soft);color:var(--green)}
.diff-code.del{background:var(--red-soft);color:var(--red)}
.diff-code.ctx{color:var(--text-secondary)}
.diff-code.hunk{
  background:var(--accent-soft);color:var(--accent);font-weight:600;
  padding:4px 12px!important;
}
.diff-line-add{background:rgba(63,185,80,.04)}
.diff-line-del{background:rgba(248,81,73,.04)}
.diff-hunk td{background:var(--accent-soft)}
.diff-binary,.diff-empty{
  padding:2rem;text-align:center;color:var(--text-tertiary);font-size:.85rem;
}

/*── Commit lazy load ─────────────────────────────────────────────*/
.commit-load-more{
  text-align:center;padding:1.5rem;
}
.commit-load-more button{
  background:var(--bg-elevated);border:1px solid var(--border-subtle);
  color:var(--text-secondary);border-radius:var(--radius);cursor:pointer;
  font-size:.82rem;transition:all var(--transition);
}
.commit-load-more button:hover{background:var(--bg-hover);color:var(--text);border-color:var(--accent)}

/*── File Finder Modal ────────────────────────────────────────────*/
.file-finder-modal{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,.5);
  z-index:200;display:flex;align-items:flex-start;justify-content:center;
  padding:15vh 1rem 2rem;
}
.file-finder-inner{
  background:var(--bg-card);border:1px solid var(--border);
  border-radius:var(--radius-lg);width:100%;max-width:540px;
  box-shadow:var(--shadow-lg);overflow:hidden;
  animation:slideDown .2s ease-out;
}
.file-finder-search{
  display:flex;align-items:center;gap:.5rem;padding:.65rem 1rem;
  border-bottom:1px solid var(--border-subtle);
}
.file-finder-search svg{color:var(--text-tertiary);flex-shrink:0}
.file-finder-search input{
  flex:1;background:none;border:none;color:var(--text);font-size:.9rem;
  outline:none;font-family:var(--font-sans);
}
.file-finder-list{max-height:300px;overflow-y:auto;padding:.25rem 0}
.file-finder-item{
  padding:.45rem 1rem;font-family:var(--font-mono);font-size:.8rem;
  cursor:pointer;transition:background var(--transition);
  min-height:36px;display:flex;align-items:center;
}
.file-finder-item:hover,.file-finder-item.active{background:var(--bg-hover);color:var(--accent)}
.file-finder-empty{padding:1rem;text-align:center;color:var(--text-tertiary);font-size:.85rem}
.file-finder-hint{
  display:flex;align-items:center;gap:.75rem;padding:.5rem 1rem;
  border-top:1px solid var(--border-subtle);color:var(--text-tertiary);
  font-size:.72rem;
}
.file-finder-hint kbd{
  background:var(--bg-elevated);border:1px solid var(--border-subtle);
  border-radius:3px;padding:1px 5px;font-family:var(--font-mono);font-size:.65rem;
}

/*── Shortcuts Help ───────────────────────────────────────────────*/
.shortcuts-help{padding:1.5rem}
.shortcuts-help h3{margin-bottom:1rem;font-size:1rem}
.shortcut-grid{display:grid;grid-template-columns:1fr 1fr;gap:.5rem .75rem}
.shortcut-grid div{display:flex;align-items:center;gap:.5rem;font-size:.82rem}
.shortcut-grid kbd{
  background:var(--bg-elevated);border:1px solid var(--border-subtle);
  border-radius:4px;padding:2px 7px;font-family:var(--font-mono);font-size:.72rem;
  min-width:24px;text-align:center;
}
.shortcut-grid span{color:var(--text-secondary)}

/*── Responsive: Tablet (≤1024px) ─────────────────────────────────*/
@media(max-width:1024px){
  .repo-layout{grid-template-columns:1fr!important}
  .repo-sidebar{order:2}
  .diff-page{padding:0 .5rem}
}

/*── Responsive: Mobile (≤768px) ──────────────────────────────────*/
@media(max-width:768px){
  .hamburger{display:flex}

  header nav{
    position:fixed;top:var(--header-height);left:0;right:0;
    background:var(--bg-card);
    border-bottom:1px solid var(--border);
    flex-direction:column;align-items:stretch;gap:0;
    padding:.5rem 0;
    display:none;z-index:99;box-shadow:var(--shadow-lg);
  }
  header nav.mobile-open{display:flex}
  header nav a{
    padding:.75rem 1.25rem;border-radius:0;font-size:.9rem;
    min-height:44px;display:flex;align-items:center;
  }
  header nav a:hover{background:var(--bg-hover)}
  header nav .header-badge{
    margin:.5rem 1.25rem;align-self:flex-start;
  }
  .theme-toggle{
    margin:.25rem 1rem;align-self:flex-start;
  }

  .container{padding:.75rem .65rem}
  .hero-wordmark{font-size:2.5rem}

  .repo-grid{grid-template-columns:1fr}
  .repo-layout{grid-template-columns:1fr}
  .repo-card{padding:1rem}

  .file-table-header{flex-direction:column;align-items:flex-start;gap:.35rem}
  .file-table .row{min-height:44px}

  .stats-bar{flex-wrap:wrap;gap:.5rem}
  .clone-btn{order:5;margin-left:0;min-height:44px}

  .blob-toolbar{flex-wrap:wrap}
  .blob-actions{flex-wrap:wrap}
  .blob-actions .btn-small{min-height:44px;min-width:44px}
  .blob-code{max-width:100vw}

  pre,code{overflow-x:auto;max-width:100%;word-break:break-all}

  .breadcrumb{font-size:.8rem;flex-wrap:wrap}

  .commit-item{flex-direction:column;align-items:flex-start;gap:.35rem}
  .commit-item .sha-col{align-self:flex-end}

  .diff-stats-bar{flex-wrap:wrap}
  .diff-file-header{flex-wrap:wrap;gap:.35rem}
  .diff-file-path{min-width:0;flex-basis:100%}
  .diff-ln{width:32px;min-width:32px;font-size:.65rem;padding:0 4px!important}
  .diff-code{font-size:.7rem;padding:0 6px!important}

  .diff-file-toc li{flex-wrap:wrap}
  .diff-toc-path{flex-basis:calc(100% - 30px)}

  .shortcut-grid{grid-template-columns:1fr}

  /* Touch-friendly: minimum 44px tap targets */
  button,.btn-small,.ref-btn,.clone-btn,.commit-sha,a.commit-sha,
  .file-table .row,.repo-card,.theme-toggle,.hamburger{
    min-height:44px;
  }
  .ref-item{min-height:44px;display:flex;align-items:center}
}

/*── Responsive: Small mobile (≤480px) — existing rules ───────────*/

/*── Print ────────────────────────────────────────────────────────*/
@media print{
  header,footer,.loading-bar,#toastContainer,.search-wrapper,.clone-btn,.blob-actions,.stats-bar,.ref-selector,.repo-carousel{display:none!important}
  body{background:#fff;color:#000}
  .container{max-width:none;padding:0}
  .repo-layout{grid-template-columns:1fr}
  .readme-body{padding:0}
  .readme-body.markdown p,.readme-body.markdown li{color:#333}
  .readme-body.markdown h1,.readme-body.markdown h2,.readme-body.markdown h3{color:#000}
  .file-table .row{border-bottom:1px solid #ddd}
  .blob-code .line-num{color:#999}
  .blob-code .line-code{color:#000}
  a{color:#000;text-decoration:underline}
}

/*── Profile Page ─────────────────────────────────────────────────*/
.profile-page{max-width:900px;margin:0 auto;padding:2rem 1.5rem}
.profile-header{
  display:flex;gap:2rem;align-items:flex-start;
  padding:2rem;background:var(--bg-card);border:1px solid var(--border);
  border-radius:var(--radius-lg);margin-bottom:2rem;
}
.profile-avatar-wrap{flex-shrink:0}
.profile-avatar-wrap img,.profile-avatar-wrap .avatar{
  width:96px;height:96px;border-radius:50%;object-fit:cover;
  border:3px solid var(--border);
}
.profile-info{flex:1;min-width:0}
.profile-display-name{font-size:1.5rem;font-weight:700;margin:0 0 .25rem;line-height:1.3}
.profile-handle{color:var(--text-secondary);font-size:.95rem;margin-bottom:.5rem}
.profile-bio{color:var(--text-secondary);font-size:.9rem;margin-bottom:.75rem;line-height:1.5}
.profile-wallet{
  display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem;
  background:var(--bg-elevated);border:1px solid var(--border-subtle);
  border-radius:var(--radius);padding:.35rem .65rem;
  max-width:100%;overflow:hidden;
}
.profile-wallet code{
  font-family:var(--font-mono);font-size:.78rem;color:var(--text-secondary);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;
  user-select:all;
}
.profile-copy-btn{
  flex-shrink:0;padding:.2rem .35rem;background:none;border:none;
  color:var(--text-secondary);cursor:pointer;border-radius:var(--radius-sm);
  display:flex;align-items:center;
}
.profile-copy-btn:hover{color:var(--accent);background:var(--accent-soft)}
.profile-links{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.25rem}
.profile-link-item{
  display:inline-flex;align-items:center;gap:.3rem;
  font-size:.82rem;color:var(--accent);padding:.25rem .6rem;
  border:1px solid var(--border-subtle);border-radius:var(--radius);
  transition:all var(--transition);
}
.profile-link-item:hover{background:var(--accent-soft);border-color:var(--accent);text-decoration:none}
.profile-repos-section{margin-top:1.5rem}
.profile-repos-section .section-heading{margin-bottom:1rem}

/*── Profile Card (popover) ───────────────────────────────────────*/
.profile-card{
  position:absolute;z-index:200;
  background:var(--bg-elevated);border:1px solid var(--border);
  border-radius:var(--radius-lg);padding:1rem;
  box-shadow:var(--shadow-lg);min-width:260px;max-width:320px;
  animation:slideDown .15s ease-out;
}
.profile-card .profile-card-header{display:flex;align-items:center;gap:.75rem;margin-bottom:.5rem}
.profile-card .profile-card-avatar{width:40px;height:40px;border-radius:50%;flex-shrink:0}
.profile-card .profile-card-name{font-weight:600;font-size:.9rem}
.profile-card .profile-card-handle{color:var(--text-secondary);font-size:.8rem}
.profile-card .profile-card-bio{color:var(--text-secondary);font-size:.82rem;margin-bottom:.5rem;line-height:1.4}
.profile-card .profile-card-addr{font-family:var(--font-mono);font-size:.72rem;color:var(--text-tertiary)}

/*── Profile Avatar (shared) ──────────────────────────────────────*/
.profile-avatar{border-radius:50%;object-fit:cover;vertical-align:middle}
.profile-avatar.sm{width:16px;height:16px}
.profile-avatar.md{width:24px;height:24px}
.profile-avatar.lg{width:40px;height:40px}
.profile-avatar.xl{width:96px;height:96px}

/*── Profile Link (clickable owner names) ─────────────────────────*/
.profile-link{
  display:inline-flex;align-items:center;gap:.35rem;
  color:var(--text);font-weight:500;transition:color var(--transition);
  text-decoration:none;
}
.profile-link:hover{color:var(--accent);text-decoration:none}
.profile-link .avatar{border-radius:50%}

/*── Responsive profile page ──────────────────────────────────────*/
@media(max-width:600px){
  .profile-header{flex-direction:column;align-items:center;text-align:center;gap:1rem;padding:1.5rem 1rem}
  .profile-wallet{justify-content:center}
  .profile-links{justify-content:center}
}


/*── Wallet Connection Button ─────────────────────────────────────*/
#walletArea{display:flex;align-items:center}
.wallet-btn{
  display:inline-flex;align-items:center;gap:.4rem;
  padding:.4rem .85rem;
  border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--bg-elevated);color:var(--text-secondary);
  font-size:.82rem;font-weight:500;cursor:pointer;
  transition:all var(--transition);white-space:nowrap;
}
.wallet-btn:hover{color:var(--text);border-color:var(--accent);background:var(--accent-soft)}
.wallet-btn-connected{gap:.35rem}
.wallet-dot{
  width:7px;height:7px;border-radius:50%;
  background:var(--green);flex-shrink:0;
}
.wallet-addr{font-family:var(--font-mono);font-size:.78rem}
.wallet-connected{position:relative}
.wallet-dropdown{
  display:none;position:absolute;top:calc(100% + 6px);right:0;
  background:var(--bg-elevated);border:1px solid var(--border);
  border-radius:var(--radius-lg);padding:.35rem 0;
  box-shadow:var(--shadow-lg);min-width:180px;z-index:300;
  animation:slideDown .12s ease-out;
}
.wallet-dropdown.open{display:block}
.wallet-dropdown-item{
  display:block;width:100%;padding:.5rem .85rem;
  background:none;border:none;color:var(--text-secondary);
  font-size:.82rem;text-align:left;cursor:pointer;
  transition:all var(--transition);
}
.wallet-dropdown-item:hover{color:var(--text);background:var(--bg-hover)}
.wallet-dropdown-disconnect{color:var(--red)}
.wallet-dropdown-disconnect:hover{background:var(--red-soft);color:var(--red)}
.wallet-dropdown-divider{
  border:none;border-top:1px solid var(--border-subtle);
  margin:.25rem 0;
}

/*── Wallet Connect Modal ─────────────────────────────────────────*/
.wallet-modal-overlay{
  position:fixed;top:0;left:0;right:0;bottom:0;z-index:2000;
  background:rgba(0,0,0,.6);backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;
  animation:fadeIn .15s ease-out;
}
.wallet-modal{
  background:var(--bg-card);border:1px solid var(--border);
  border-radius:var(--radius-xl);
  width:92%;max-width:440px;
  box-shadow:var(--shadow-lg);
  animation:slideDown .2s ease-out;
}
.wm-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:1.25rem 1.5rem 0;
}
.wm-header h2{font-size:1.15rem;font-weight:700;margin:0}
.wm-close{
  background:none;border:none;color:var(--text-secondary);cursor:pointer;
  font-size:1.5rem;line-height:1;padding:.25rem;border-radius:var(--radius);
  transition:all var(--transition);
}
.wm-close:hover{color:var(--text);background:var(--bg-hover)}
.wm-body{padding:1rem 1.5rem 1.5rem}
.wm-desc{font-size:.88rem;color:var(--text-secondary);margin-bottom:1.25rem;line-height:1.5}
.wm-options{display:flex;flex-direction:column;gap:.5rem}
.wm-option{
  display:flex;align-items:center;gap:1rem;
  padding:1rem;border-radius:var(--radius-lg);
  border:1px solid var(--border-subtle);background:var(--bg-elevated);
  cursor:pointer;text-align:left;color:var(--text);
  transition:all var(--transition);width:100%;
}
.wm-option:hover:not(.wm-option-disabled){
  border-color:var(--accent);background:var(--accent-soft);
}
.wm-option-disabled{opacity:.5;cursor:default}
.wm-option-icon{
  width:44px;height:44px;border-radius:var(--radius);
  background:var(--accent-soft);color:var(--accent);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.wm-option-text{display:flex;flex-direction:column;gap:.15rem;min-width:0}
.wm-option-text strong{font-size:.92rem;font-weight:600}
.wm-option-text span{font-size:.8rem;color:var(--text-secondary)}
.wm-badge{
  margin-left:auto;font-size:.72rem;font-weight:600;
  background:var(--green-soft);color:var(--green);
  padding:.2rem .6rem;border-radius:99px;white-space:nowrap;
}
.wm-install-hint{
  font-size:.82rem;color:var(--text-secondary);
  padding:.5rem .25rem;text-align:center;
}
.wm-install-hint a{margin:0 .25rem;font-weight:500}
.wm-or{color:var(--text-tertiary);margin:0 .1rem}
.wm-divider{
  display:flex;align-items:center;gap:.75rem;
  margin:.5rem 0;color:var(--text-tertiary);font-size:.78rem;
}
.wm-divider::before,.wm-divider::after{
  content:'';flex:1;height:1px;background:var(--border-subtle);
}
.wm-status{
  margin-top:1rem;padding:.75rem 1rem;border-radius:var(--radius);
  font-size:.84rem;line-height:1.4;
}
.wm-status-info{background:var(--accent-soft);color:var(--accent)}
.wm-status-error{background:var(--red-soft);color:var(--red)}
.wm-status-hint{display:inline-block;margin-top:.35rem;font-size:.78rem;opacity:.8;line-height:1.45}

/*── Profile Edit Page ────────────────────────────────────────────*/
.profile-edit-page{max-width:640px;margin:0 auto;padding:2rem 1.5rem}
.profile-edit-header{margin-bottom:1.5rem}
.profile-edit-header h1{
  font-size:1.4rem;font-weight:700;display:flex;align-items:center;gap:.5rem;
  margin-bottom:.35rem;
}
.profile-edit-header h1 svg{width:20px;height:20px;color:var(--accent)}
.profile-edit-header .text-secondary{font-size:.88rem;color:var(--text-secondary)}

.profile-edit-wallet-bar{
  display:flex;align-items:center;justify-content:space-between;
  padding:.65rem 1rem;margin-bottom:1.5rem;
  background:var(--bg-card);border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
}
.profile-edit-wallet-info{display:flex;align-items:center;gap:.5rem}
.profile-edit-wallet-info code{font-size:.82rem;color:var(--text-secondary)}

.profile-edit-form{display:flex;flex-direction:column;gap:1.25rem}

.form-section{display:flex;flex-direction:column;gap:.4rem}
.form-label{font-size:.85rem;font-weight:600;color:var(--text)}
.form-help{font-size:.78rem;color:var(--text-tertiary);margin:0}
.form-input,.form-textarea{
  width:100%;padding:.55rem .75rem;
  background:var(--bg-card);color:var(--text);
  border:1px solid var(--border);border-radius:var(--radius);
  font-size:.88rem;font-family:var(--font-sans);
  transition:border-color var(--transition),box-shadow var(--transition);
  outline:none;
}
.form-textarea{resize:vertical;min-height:80px;line-height:1.5}
.form-input:focus,.form-textarea:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
.form-input::placeholder,.form-textarea::placeholder{color:var(--text-tertiary)}
.form-char-count{font-size:.75rem;color:var(--text-tertiary);text-align:right}

.avatar-upload-area{display:flex;align-items:center;gap:1.25rem}
.avatar-preview{flex-shrink:0}
.avatar-preview img{display:block}
.avatar-upload-controls{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.avatar-upload-controls .form-help{width:100%;margin-top:.15rem}

.form-actions{
  display:flex;align-items:center;gap:.75rem;
  padding-top:.5rem;
}
.btn-primary{
  display:inline-flex;align-items:center;justify-content:center;gap:.4rem;
  padding:.6rem 1.25rem;
  background:var(--accent);color:#fff;
  border:none;border-radius:var(--radius-lg);
  font-size:.88rem;font-weight:600;cursor:pointer;
  transition:all var(--transition);
}
.btn-primary:hover{background:#79c0ff;box-shadow:0 0 12px var(--accent-glow)}
.btn-primary:disabled{opacity:.5;cursor:not-allowed}
.btn-outline{
  background:transparent;border:1px solid var(--border);color:var(--text-secondary);
}
.btn-outline:hover{border-color:var(--text-secondary);color:var(--text)}
.btn-edit-profile{
  display:inline-flex;align-items:center;gap:.3rem;
  text-decoration:none;color:var(--text-secondary);
  font-size:.82rem;
}
.btn-edit-profile:hover{color:var(--accent);text-decoration:none}

.form-note{
  margin-top:.5rem;padding:.85rem 1rem;
  background:var(--gradient-subtle);border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  font-size:.8rem;color:var(--text-secondary);line-height:1.5;
}
.form-note strong{color:var(--text)}

.spinner{
  display:inline-block;width:14px;height:14px;
  border:2px solid rgba(255,255,255,.3);
  border-top-color:#fff;border-radius:50%;
  animation:spin .6s linear infinite;
  vertical-align:middle;
}

/*── Connect Prompt ───────────────────────────────────────────────*/
.connect-prompt{
  text-align:center;padding:4rem 1.5rem;
  max-width:420px;margin:0 auto;
}
.connect-prompt-icon{font-size:3rem;margin-bottom:1rem}
.connect-prompt h2{font-size:1.5rem;margin-bottom:.5rem}
.connect-prompt p{color:var(--text-secondary);margin-bottom:.5rem;line-height:1.5}
.btn-connect-large{
  padding:.75rem 2rem;font-size:1rem;
  display:inline-flex;align-items:center;gap:.5rem;
  background:var(--accent);color:#fff;border:none;
  border-radius:var(--radius-lg);font-weight:600;cursor:pointer;
  transition:all var(--transition);
}
.btn-connect-large:hover{background:#79c0ff;box-shadow:0 0 16px var(--accent-glow)}

/*── Responsive profile edit ──────────────────────────────────────*/
@media(max-width:600px){
  .profile-edit-page{padding:1.25rem 1rem}
  .avatar-upload-area{flex-direction:column;align-items:flex-start}
  .form-actions{flex-direction:column;align-items:stretch}
  .form-actions .btn-primary{width:100%}
  .profile-edit-wallet-bar{flex-direction:column;gap:.5rem;text-align:center}
}

/*── Star Button ──────────────────────────────────────────────────*/
.star-btn{
  display:inline-flex;align-items:center;gap:.35rem;
  font-size:.82rem;padding:.3rem .7rem;border-radius:var(--radius);
  background:var(--bg-card);border:1px solid var(--border);color:var(--text-secondary);
  cursor:pointer;transition:all var(--transition);white-space:nowrap;
}
.star-btn:hover{border-color:var(--orange);color:var(--orange);background:rgba(210,153,34,.08)}
.star-btn.starred{color:var(--orange);border-color:var(--orange)}
.star-btn svg{width:14px;height:14px}
.star-count-inline{
  display:inline-flex;align-items:center;gap:.25rem;
  font-size:.82rem;color:var(--orange);font-weight:600;
}
.star-count-inline svg{width:14px;height:14px}


/* ── Issues System ──────────────────────────────────────────────── */
.issues-page { max-width: 900px; margin: 0 auto; }

.issues-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; flex-wrap: wrap; gap: .75rem;
}
.issues-title {
  font-size: 1.4rem; font-weight: 700; display: flex; align-items: center; gap: .5rem;
  margin: 0;
}
.issues-title svg { width: 22px; height: 22px; }

.issues-filters {
  display: flex; gap: .5rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border); padding-bottom: .75rem;
}
.issues-filter-btn {
  display: flex; align-items: center; gap: .4rem;
  padding: .4rem .8rem; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--fg-muted); cursor: pointer;
  font-size: .875rem; transition: all .15s ease;
}
.issues-filter-btn:hover { background: var(--bg-hover); }
.issues-filter-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
  font-weight: 600;
}

.issue-status-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.issue-status-dot.open { background: var(--green, #3fb950); }
.issue-status-dot.closed { background: var(--purple, #a371f7); }

/* Issue rows */
.issues-list { display: flex; flex-direction: column; gap: 2px; }
.issue-row {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .75rem 1rem; border-radius: 10px;
  text-decoration: none; color: var(--fg);
  border: 1px solid var(--border);
  transition: background .15s ease, border-color .15s ease;
}
.issue-row:hover { background: var(--bg-hover); border-color: var(--accent); }
.issue-status-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.issue-status-icon svg { width: 18px; height: 18px; }
.issue-status-icon.open { color: var(--green, #3fb950); }
.issue-status-icon.closed { color: var(--purple, #a371f7); }

.issue-row-main { flex: 1; min-width: 0; }
.issue-row-title {
  font-weight: 600; font-size: .95rem;
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.issue-row-meta {
  font-size: .8rem; color: var(--fg-muted); margin-top: .25rem;
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.issue-author {
  display: inline-flex; align-items: center; gap: .25rem;
  text-decoration: none; color: var(--accent);
}
.issue-author:hover { text-decoration: underline; }
.issue-author img { border-radius: 50%; }

.issue-label {
  display: inline-block; padding: .1rem .5rem; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: .72rem; font-weight: 600;
  line-height: 1.4; letter-spacing: .02em;
}

/* Issue detail */
.issue-detail-header { margin-bottom: 1.5rem; }
.issue-detail-title {
  font-size: 1.5rem; font-weight: 700; margin: 0 0 .5rem;
  line-height: 1.3;
}
.issue-detail-title .text-muted { font-weight: 400; }
.issue-detail-meta {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-size: .875rem; color: var(--fg-muted);
}
.issue-status-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .7rem; border-radius: 20px;
  font-size: .82rem; font-weight: 600;
}
.issue-status-badge.open { background: var(--green, #3fb950); color: #fff; }
.issue-status-badge.closed { background: var(--purple, #a371f7); color: #fff; }

/* Issue body card & comments */
.issue-body-card, .issue-comment {
  border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 1rem; overflow: hidden;
}
.issue-comment-header {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .6rem 1rem; background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.issue-comment-body {
  padding: 1rem; font-size: .9rem; line-height: 1.6;
}
.issue-comment-body p:last-child { margin-bottom: 0; }

.issue-comments-section { margin-top: 1.5rem; }
.issue-comments-heading {
  font-size: 1rem; font-weight: 600; margin-bottom: .75rem;
  color: var(--fg-muted);
}

.tx-link {
  font-size: .75rem; padding: .15rem .4rem; border-radius: 4px;
  background: var(--bg-hover); text-decoration: none;
  margin-left: auto;
}
.tx-link:hover { background: var(--accent); color: #fff; }

/* New issue form & comment form */
.new-issue-form, .issue-comment-form {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 1.25rem; margin-top: 1.5rem;
}
.new-issue-form h3, .issue-comment-form h4 {
  margin: 0 0 .75rem; font-size: 1.1rem;
}
.form-input {
  display: block; width: 100%; padding: .6rem .8rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--fg);
  font-size: .9rem; margin-bottom: .75rem;
  transition: border-color .15s;
}
.form-input:focus { border-color: var(--accent); outline: none; }
.form-textarea {
  display: block; width: 100%; padding: .6rem .8rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--fg);
  font-size: .9rem; font-family: inherit;
  resize: vertical; min-height: 100px; margin-bottom: .75rem;
  transition: border-color .15s;
}
.form-textarea:focus { border-color: var(--accent); outline: none; }
.form-hint {
  font-size: .78rem; color: var(--fg-muted); margin: -.4rem 0 .6rem;
}
.form-actions {
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
}
.btn-primary {
  padding: .5rem 1.2rem; border-radius: 8px; border: none;
  background: var(--accent); color: #fff; font-weight: 600;
  cursor: pointer; font-size: .875rem; transition: opacity .15s;
}
.btn-primary:hover { opacity: .85; }
.btn-secondary {
  padding: .5rem 1.2rem; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--fg-muted); cursor: pointer; font-size: .875rem;
}
.btn-secondary:hover { background: var(--bg-hover); }
.btn-danger-outline {
  padding: .5rem 1.2rem; border-radius: 8px;
  border: 1px solid var(--red, #f85149); background: transparent;
  color: var(--red, #f85149); cursor: pointer; font-size: .875rem; font-weight: 600;
}
.btn-danger-outline:hover { background: var(--red, #f85149); color: #fff; }
.btn-success-outline {
  padding: .5rem 1.2rem; border-radius: 8px;
  border: 1px solid var(--green, #3fb950); background: transparent;
  color: var(--green, #3fb950); cursor: pointer; font-size: .875rem; font-weight: 600;
}
.btn-success-outline:hover { background: var(--green, #3fb950); color: #fff; }
.btn-link {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: inherit; text-decoration: underline;
  padding: 0;
}

/* Responsive issues */
@media (max-width: 600px) {
  .issues-header { flex-direction: column; align-items: stretch; }
  .issue-row { padding: .6rem .75rem; }
  .issue-detail-title { font-size: 1.2rem; }
  .new-issue-form, .issue-comment-form { padding: .75rem; }
}

/* ── Issues & PR Enhanced Styles ─────────────────────────────────── */

/* Status colors — consolidated */
.status-open { color: var(--green, #3fb950); }
.status-closed { color: var(--purple, #a371f7); }
.status-merged { color: var(--purple, #a371f7); }

.issue-status-badge.status-open { background: var(--green-soft, rgba(63,185,80,.15)); color: var(--green, #3fb950); }
.issue-status-badge.status-closed { background: var(--purple-soft, rgba(188,140,255,.15)); color: var(--purple, #a371f7); }
.issue-status-badge.status-merged { background: var(--purple-soft, rgba(188,140,255,.15)); color: var(--purple, #a371f7); }
.issue-status-badge svg { width: 14px; height: 14px; }

.issue-status-icon.status-open { color: var(--green, #3fb950); }
.issue-status-icon.status-closed { color: var(--purple, #a371f7); }
.issue-status-icon.status-merged { color: var(--purple, #a371f7); }

/* Issues list empty state */
.issues-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3rem 1rem; text-align: center; color: var(--text-secondary, var(--fg-muted, #8b949e));
}
.issues-empty-icon { font-size: 2.5rem; margin-bottom: .75rem; opacity: .6; }
.issues-empty-icon svg { width: 48px; height: 48px; }
.issues-empty h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; color: var(--text, var(--fg, #e6edf3)); }
.issues-empty p { font-size: .9rem; }

.issues-loading { padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }

/* Issue comment count badge */
.issue-comment-count {
  display: flex; align-items: center; gap: .3rem;
  color: var(--text-secondary, var(--fg-muted, #8b949e)); font-size: .8rem;
  flex-shrink: 0; margin-left: auto;
}
.issue-comment-count svg { width: 14px; height: 14px; }

/* Issue detail layout */
.issue-detail-author {
  display: flex; align-items: center; gap: .4rem;
}
.issue-detail-author a { color: var(--accent, #58a6ff); text-decoration: none; font-weight: 500; }
.issue-detail-author a:hover { text-decoration: underline; }

.issue-detail-comments {
  color: var(--text-secondary, var(--fg-muted, #8b949e));
}

/* Timeline */
.issue-timeline {
  display: flex; flex-direction: column; gap: 1rem;
  margin-top: 1.5rem;
  position: relative;
}
.issue-timeline::before {
  content: '';
  position: absolute; left: 19px; top: 0; bottom: 0;
  width: 2px; background: var(--border, rgba(48,54,61,.65));
  z-index: 0;
  display: none; /* hidden on mobile-first, shown on wider screens */
}

/* Author badge in comments */
.issue-author-badge {
  display: inline-block; padding: .1rem .45rem; border-radius: 10px;
  background: var(--bg-hover, #1f2937); color: var(--text-secondary, var(--fg-muted, #8b949e));
  font-size: .72rem; font-weight: 600; border: 1px solid var(--border, rgba(48,54,61,.65));
}

/* Tx link in comment headers */
.issue-tx-link {
  margin-left: auto; display: flex; align-items: center;
  color: var(--text-tertiary, #484f58); opacity: .5;
  transition: opacity .15s ease;
}
.issue-tx-link:hover { opacity: 1; color: var(--accent, #58a6ff); }
.issue-tx-link svg { width: 14px; height: 14px; }

/* Comment author link */
.issue-comment-author {
  font-weight: 600; color: var(--text, var(--fg, #e6edf3));
  text-decoration: none;
}
.issue-comment-author:hover { color: var(--accent, #58a6ff); text-decoration: underline; }

/* Comment timestamp */
.issue-comment-time {
  color: var(--text-secondary, var(--fg-muted, #8b949e)); font-size: .8rem;
}

/* OP comment border accent */
.issue-comment-op {
  border-color: var(--accent-soft, rgba(88,166,255,.25));
}
.issue-comment-op .issue-comment-header {
  background: var(--accent-soft, rgba(88,166,255,.06));
}

/* New comment section */
.issue-new-comment {
  margin-top: 1.5rem;
  position: relative; z-index: 1;
}
.issue-new-comment h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: .75rem;
  color: var(--text, var(--fg, #e6edf3));
}

/* Form tabs (Write/Preview) */
.issue-form-tabs {
  display: flex; gap: 0; margin-bottom: 0;
  border-bottom: 1px solid var(--border, rgba(48,54,61,.65));
}
.issue-form-tab {
  padding: .5rem 1rem; border: none; background: none;
  color: var(--text-secondary, var(--fg-muted, #8b949e));
  cursor: pointer; font-size: .85rem; font-weight: 500;
  border-bottom: 2px solid transparent; transition: all .15s ease;
}
.issue-form-tab:hover { color: var(--text, var(--fg, #e6edf3)); }
.issue-form-tab.active {
  color: var(--accent, #58a6ff); border-bottom-color: var(--accent, #58a6ff);
  font-weight: 600;
}

/* Issue form controls */
.issue-comment-form {
  border: 1px solid var(--border, rgba(48,54,61,.65));
  border-radius: 10px; overflow: hidden;
}

.issue-textarea {
  display: block; width: 100%; padding: .75rem 1rem;
  border: none; border-bottom: 1px solid var(--border, rgba(48,54,61,.65));
  background: var(--bg, #0d1117); color: var(--text, var(--fg, #e6edf3));
  font-size: .9rem; font-family: var(--font-sans);
  resize: vertical; min-height: 100px; line-height: 1.6;
}
.issue-textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent, #58a6ff); }
.issue-textarea::placeholder { color: var(--text-tertiary, #484f58); }

.issue-input {
  display: block; width: 100%; padding: .6rem .85rem;
  border: 1px solid var(--border, rgba(48,54,61,.65)); border-radius: 8px;
  background: var(--bg, #0d1117); color: var(--text, var(--fg, #e6edf3));
  font-size: .9rem; font-family: var(--font-sans);
  transition: border-color .15s ease;
}
.issue-input:focus { outline: none; border-color: var(--accent, #58a6ff); box-shadow: 0 0 0 3px var(--accent-soft, rgba(88,166,255,.1)); }
.issue-input::placeholder { color: var(--text-tertiary, #484f58); }

.issue-select {
  display: block; width: 100%; padding: .5rem .75rem;
  border: 1px solid var(--border, rgba(48,54,61,.65)); border-radius: 8px;
  background: var(--bg-card, #161b22); color: var(--text, var(--fg, #e6edf3));
  font-size: .85rem; font-family: var(--font-sans);
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%238b949e' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.78 5.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 6.28a.75.75 0 011.06-1.06L8 8.94l3.72-3.72a.75.75 0 011.06 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px;
  padding-right: 2rem;
}
.issue-select:focus { outline: none; border-color: var(--accent, #58a6ff); }

.issue-preview {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border, rgba(48,54,61,.65));
  min-height: 100px;
  background: var(--bg, #0d1117);
}

.issue-form-actions {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; justify-content: flex-end;
  background: var(--bg-card, #161b22);
}

.issue-form-group {
  margin-bottom: 1rem;
}
.issue-form-group label {
  display: block; font-weight: 600; font-size: .85rem;
  margin-bottom: .4rem; color: var(--text, var(--fg, #e6edf3));
}

.issue-form-card {
  border: 1px solid var(--border, rgba(48,54,61,.65));
  border-radius: 12px; padding: 1.5rem;
  background: var(--bg-card, #161b22);
}

.issue-new-page {
  max-width: 800px; margin: 0 auto;
}
.issue-new-page h2 {
  font-size: 1.4rem; font-weight: 700; margin-bottom: 1.25rem;
}

/* Status toggle button */
.issue-status-toggle {
  margin-right: auto;
}

/* Markdown body rendering */
.markdown-body { line-height: 1.7; word-wrap: break-word; }
.markdown-body p { margin-bottom: .75rem; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 1rem 0 .5rem; font-weight: 600; }
.markdown-body h1 { font-size: 1.5rem; }
.markdown-body h2 { font-size: 1.25rem; }
.markdown-body h3 { font-size: 1.1rem; }
.markdown-body pre { background: var(--bg, #0d1117); padding: 1rem; border-radius: 8px; overflow-x: auto; margin: .75rem 0; }
.markdown-body code { font-family: var(--font-mono); font-size: .85em; }
.markdown-body pre code { background: none; padding: 0; }
.markdown-body :not(pre) > code { background: var(--bg-hover, #1f2937); padding: .15rem .4rem; border-radius: 4px; }
.markdown-body ul, .markdown-body ol { padding-left: 1.5rem; margin-bottom: .75rem; }
.markdown-body li { margin-bottom: .25rem; }
.markdown-body blockquote { border-left: 3px solid var(--accent, #58a6ff); padding: .25rem 1rem; margin: .75rem 0; color: var(--text-secondary); }
.markdown-body hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: .75rem 0; }
.markdown-body th, .markdown-body td { border: 1px solid var(--border); padding: .4rem .75rem; text-align: left; }
.markdown-body th { background: var(--bg-card); font-weight: 600; }
.markdown-body img { max-width: 100%; border-radius: 8px; }

.text-muted { color: var(--text-secondary, var(--fg-muted, #8b949e)); }

/* Button variants */
.btn-small {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .75rem; border-radius: 8px;
  font-size: .82rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); transition: all .15s ease;
}
.btn-small:hover { background: var(--bg-hover); color: var(--text); }
.btn-small svg { width: 14px; height: 14px; }

.btn-success {
  background: var(--green-soft, rgba(63,185,80,.12)); color: var(--green, #3fb950);
  border-color: var(--green, #3fb950);
}
.btn-success:hover { background: var(--green, #3fb950); color: #fff; }

.btn-danger {
  background: var(--red-soft, rgba(248,81,73,.12)); color: var(--red, #f85149);
  border-color: var(--red, #f85149);
}
.btn-danger:hover { background: var(--red, #f85149); color: #fff; }

.btn-merge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.2rem; border-radius: 8px;
  background: var(--green, #3fb950); color: #fff;
  border: none; font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.btn-merge:hover { filter: brightness(1.1); box-shadow: 0 0 12px rgba(63,185,80,.3); }
.btn-merge svg { width: 16px; height: 16px; }

/* PR branch badges */
.pr-ref-badge {
  display: inline-block; padding: .1rem .5rem; border-radius: 6px;
  background: var(--accent-soft, rgba(88,166,255,.1)); color: var(--accent, #58a6ff);
  font-size: .78rem; font-weight: 600; font-family: var(--font-mono);
}

.pr-branch-selectors {
  display: flex; align-items: flex-end; gap: .75rem; margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.pr-branch-group {
  flex: 1; min-width: 140px;
}
.pr-branch-group label {
  display: block; font-weight: 600; font-size: .82rem; margin-bottom: .35rem;
  color: var(--text-secondary);
}
.pr-branch-arrow {
  font-size: 1.2rem; color: var(--text-secondary); padding-bottom: .4rem;
  font-weight: 700;
}

.pr-sha-info {
  font-size: .82rem; color: var(--text-secondary);
  margin-bottom: 1rem;
}
.pr-sha-info code {
  background: var(--bg-hover); padding: .15rem .4rem; border-radius: 4px;
  font-family: var(--font-mono); font-size: .8rem;
}

/* Filter buttons SVG sizing */
.issues-filter-btn svg { width: 14px; height: 14px; }

/* Responsive */
@media (max-width: 600px) {
  .pr-branch-selectors { flex-direction: column; }
  .pr-branch-arrow { display: none; }
  .issue-form-actions { flex-direction: column; }
  .issue-form-actions .btn-merge { width: 100%; justify-content: center; }
}
