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

/* ── GitHub dark exact tokens ── */
:root{
  --canvas:      #0d1117;
  --canvas-sub:  #161b22;
  --canvas-inset:#010409;
  --border:      #30363d;
  --border-sub:  #21262d;
  --fg:          #e6edf3;
  --fg-muted:    #8b949e;
  --fg-subtle:   #6e7681;
  --accent:      #58a6ff;
  --accent-em:   #1f6feb;
  --green:       #3fb950;
  --green-em:    #238636;
  --red:         #f85149;
  --orange:      #f78166;
  --btn:         #21262d;
  --btn-border:  #30363d;
  --btn-hover:   #30363d;
  --btn-border-h:#8b949e;
}

html{font-size:14px;-webkit-font-smoothing:antialiased}
body{
  background:var(--canvas);
  color:var(--fg);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif;
  font-size:14px;line-height:1.5;min-height:100vh;
}

/* ════════════ HEADER ════════════ */
.gh-header{
  background:#161b22;
  border-bottom:1px solid var(--border);
  height:62px;
  position:sticky;top:0;z-index:200;
  display:flex;align-items:center;
}
.gh-header-inner{
  max-width:1280px;margin:0 auto;padding:0 16px;
  width:100%;display:flex;align-items:center;gap:8px;
}

/* Hamburger */
.gh-hamburger{
  width:32px;height:32px;border-radius:6px;
  background:none;border:none;color:var(--fg);
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.gh-hamburger:hover{background:rgba(177,186,196,.12)}
.gh-hamburger svg{width:16px;height:16px;fill:currentColor}

/* Logo */
.gh-logo{color:var(--fg);flex-shrink:0;display:flex;align-items:center;margin:0 8px}
.gh-logo svg{width:32px;height:32px;fill:currentColor}

/* Search */
.gh-search{
  flex:1;max-width:272px;
  background:var(--canvas);
  border:1px solid var(--border);
  border-radius:6px;
  height:32px;padding:0 12px;
  display:flex;align-items:center;gap:8px;
  cursor:text;
}
.gh-search-text{flex:1;font-size:12px;color:var(--fg-subtle)}
.gh-search-badge{
  background:var(--canvas-sub);
  border:1px solid rgba(110,118,129,.4);
  border-radius:6px;padding:0 5px;
  font-size:11px;color:var(--fg-muted);
  font-family:monospace;line-height:18px;
}

/* Nav links */
.gh-nav{display:flex;align-items:center;gap:0;margin-left:4px}
.gh-nav-item{
  padding:6px 8px;border-radius:6px;
  color:var(--fg);font-weight:600;font-size:14px;
  cursor:pointer;background:none;border:none;
  font-family:inherit;white-space:nowrap;
  display:flex;align-items:center;gap:4px;
}
.gh-nav-item:hover{background:rgba(177,186,196,.12)}
.gh-nav-item svg{width:16px;height:16px;fill:currentColor;opacity:.7}

/* Right icons */
.gh-header-right{margin-left:auto;display:flex;align-items:center;gap:2px}
.gh-icon-btn{
  width:32px;height:32px;border-radius:6px;
  background:none;border:none;color:var(--fg);
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  position:relative;
}
.gh-icon-btn:hover{background:rgba(177,186,196,.12)}
.gh-icon-btn svg{width:16px;height:16px;fill:currentColor}
.gh-avatar{
  width:32px;height:32px;border-radius:50%;
  background:#30363d;
  border:2px solid rgba(240,246,252,.1);
  overflow:hidden;cursor:pointer;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
}
.gh-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.gh-avatar svg{fill:#8b949e;width:20px;height:20px}

/* ════════════ REPO HEADER ════════════ */
.repohead{
  background:var(--canvas);
  border-bottom:1px solid var(--border);
  padding:16px 0 0;
}
.repohead-inner{max-width:1280px;margin:0 auto;padding:0 16px}

/* Top row: avatar + owner/repo + public badge + Watch/Fork/Star */
.repohead-top{
  display:flex;align-items:center;gap:8px;
  margin-bottom:12px;flex-wrap:wrap;
}
.repo-owner-avatar{
  width:20px;height:20px;border-radius:50%;
  overflow:hidden;flex-shrink:0;
}
.repo-owner-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.repo-title{
  display:flex;align-items:center;gap:6px;
  font-size:20px;font-weight:400;flex-wrap:wrap;
}
.repo-title a{color:var(--accent);text-decoration:none}
.repo-title a:hover{text-decoration:underline}
.repo-title .sep{color:var(--fg-muted);font-size:20px;font-weight:300}
.repo-title .repo-name{font-weight:600}
.badge-public{
  font-size:12px;font-weight:500;
  padding:1px 8px;
  border:1px solid var(--border);border-radius:20px;
  color:var(--fg-muted);
}
.repohead-actions{margin-left:auto;display:flex;align-items:center;gap:6px;flex-wrap:wrap}

/* Watch / Fork / Star buttons — exact GitHub style */
.btn-group{display:inline-flex;border-radius:6px;overflow:hidden}
.btn-group .btn{border-radius:0}
.btn-group .btn:first-child{border-radius:6px 0 0 6px;border-right:none}
.btn-count{
  display:inline-flex;align-items:center;
  padding:3px 10px;
  border:1px solid var(--btn-border);border-left:none;
  border-radius:0 6px 6px 0;
  background:var(--btn);
  color:var(--fg);font-size:12px;font-weight:600;
  line-height:20px;
}

/* Tabs */
.repohead-tabs{display:flex;overflow-x:auto;margin-top:0}
.gh-tab{
  display:flex;align-items:center;gap:6px;
  padding:8px 16px;
  font-size:14px;color:var(--fg-muted);
  cursor:pointer;
  border-bottom:2px solid transparent;
  white-space:nowrap;
  background:none;border-top:none;border-left:none;border-right:none;
  font-family:inherit;transition:color .1s;
}
.gh-tab:hover{color:var(--fg);border-bottom-color:var(--border)}
.gh-tab.active{color:var(--fg);font-weight:600;border-bottom-color:var(--orange)}
.gh-tab svg{width:16px;height:16px;fill:currentColor;opacity:.7}
.gh-tab.active svg{opacity:1}
.gh-tab .counter{background:rgba(99,110,123,.4);border-radius:20px;padding:0 6px;font-size:12px;font-weight:500}

/* ════════════ LAYOUT ════════════ */
.container{max-width:1280px;margin:0 auto;padding:16px;display:flex;gap:24px}
.col-main{flex:1;min-width:0}
.col-side{width:296px;flex-shrink:0}

/* ════════════ BRANCH BAR ════════════ */
.branch-bar{
  display:flex;align-items:center;gap:8px;
  margin-bottom:16px;flex-wrap:wrap;
}
.branch-bar-right{margin-left:auto;display:flex;gap:8px}

/* ════════════ BUTTONS ════════════ */
.btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:3px 12px;
  border-radius:6px;font-size:14px;font-weight:500;
  cursor:pointer;
  border:1px solid var(--btn-border);
  background:var(--btn);color:var(--fg);
  font-family:inherit;white-space:nowrap;
  line-height:22px;
  transition:background .1s,border-color .1s;
}
.btn:hover{background:var(--btn-hover);border-color:var(--btn-border-h)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn svg{width:16px;height:16px;fill:currentColor;flex-shrink:0}
.btn-green{background:var(--green-em);border-color:rgba(240,246,252,.1);color:#fff}
.btn-green:hover:not(:disabled){background:#2ea043}

/* Code button (green) */
.btn-code{
  background:var(--green-em);
  border-color:rgba(240,246,252,.1);
  color:#fff;
  display:inline-flex;align-items:center;gap:6px;
  padding:3px 12px;border-radius:6px;font-size:14px;font-weight:500;
  cursor:pointer;font-family:inherit;white-space:nowrap;line-height:22px;
}
.btn-code:hover{background:#2ea043}
.btn-code svg{width:16px;height:16px;fill:currentColor}

/* ════════════ INPUT BOX ════════════ */
.Box{border:1px solid var(--border);border-radius:6px;overflow:hidden;margin-bottom:16px}
.Box-hdr{
  background:var(--canvas-sub);
  border-bottom:1px solid var(--border);
  padding:10px 16px;
  display:flex;align-items:center;gap:8px;
  font-size:14px;font-weight:600;
}
.Box-hdr svg{width:16px;height:16px;fill:var(--fg-muted);flex-shrink:0}
.Box-body{padding:20px 16px;background:var(--canvas);display:flex;flex-direction:column;gap:16px}
.Box-footer{
  display:flex;align-items:center;gap:10px;
  padding:10px 16px;
  background:var(--canvas-sub);
  border-top:1px solid var(--border);
}

/* ── How-it-works steps ── */
.how-steps{
  display:grid;grid-template-columns:repeat(4,1fr);
  gap:0;position:relative;
}
/* single line behind circles */
.how-steps::before{
  content:'';position:absolute;
  top:13px;
  left:calc(12.5% + 14px);
  right:calc(12.5% + 14px);
  height:1px;background:var(--border-sub);z-index:0;
}
.how-step{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:0 12px 0 0}
.step-circle{
  width:28px;height:28px;border-radius:50%;
  background:var(--canvas-sub);border:1px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:700;color:var(--fg-muted);
  flex-shrink:0;position:relative;z-index:1;
}
.step-title{font-size:12px;font-weight:600;color:var(--fg);margin-bottom:2px}
.step-desc{font-size:11px;color:var(--fg-muted);line-height:1.5}

/* ── URL input ── */
.FormControl{display:flex;flex-direction:column;gap:6px}
.FormControl-label{font-size:14px;font-weight:600;color:var(--fg)}
.FormControl-label .req{color:var(--red);margin-left:2px}
.input-row{display:flex;align-items:stretch}
.input-prefix{
  display:flex;align-items:center;
  padding:0 12px;
  background:var(--canvas-sub);
  border:1px solid var(--border);
  border-right:none;border-radius:6px 0 0 6px;
  font-size:13px;color:var(--fg-muted);
  white-space:nowrap;flex-shrink:0;
}
.url-input{
  flex:1;
  background:var(--canvas);
  border:1px solid var(--border);
  border-radius:0 6px 6px 0;
  color:var(--fg);
  font-family:ui-monospace,SFMono-Regular,"SF Mono",monospace;
  font-size:14px;padding:5px 12px;
  outline:none;height:32px;
  transition:border-color .15s,box-shadow .15s;
}
.url-input:focus{border-color:var(--accent-em);box-shadow:0 0 0 3px rgba(31,111,235,.3)}
::placeholder{color:var(--fg-subtle)}

/* status */
.status-line{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--fg-muted);min-height:18px;margin-top:6px}
.sdot{width:8px;height:8px;border-radius:50%;background:var(--border);flex-shrink:0}
.sdot.fetching{background:var(--accent);animation:pulse 1s ease-in-out infinite}
.sdot.generating{background:#bc8cff;animation:pulse .8s ease-in-out infinite}
.sdot.done{background:var(--green)}
.sdot.error{background:var(--red)}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}

/* spinner */
.Spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .6s linear infinite;display:none;flex-shrink:0}
@keyframes spin{to{transform:rotate(360deg)}}

/* progress */
.prog-wrap{height:2px;overflow:hidden;display:none}
.prog-bar{height:100%;background:linear-gradient(90deg,var(--green-em),var(--green));width:0%;transition:width .4s}

/* status row */
.status-row{display:none;align-items:center;gap:8px;padding:10px 16px;border-top:1px solid var(--border);font-size:13px;color:var(--fg-muted)}
.status-row.on{display:flex}
.status-pulse{width:8px;height:8px;border-radius:50%;background:var(--green);animation:pulse 1.4s ease infinite;flex-shrink:0}

/* ════════════ ERROR FLASH ════════════ */
.flash{display:none;align-items:center;gap:10px;padding:12px 16px;border-radius:6px;font-size:14px;margin-bottom:12px;border:1px solid transparent}
.flash.on{display:flex}
.flash-error{background:rgba(248,81,73,.1);border-color:rgba(248,81,73,.4);color:var(--red)}
.flash svg{width:16px;height:16px;fill:currentColor;flex-shrink:0}

/* ════════════ README BOX ════════════ */
.readme-box{border:1px solid var(--border);border-radius:6px;overflow:hidden}
.readme-hdr{
  background:var(--canvas-sub);
  border-bottom:1px solid var(--border);
  padding:0 16px;min-height:44px;
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
}
.readme-hdr svg{width:16px;height:16px;fill:var(--fg-muted);flex-shrink:0}
.readme-title{font-weight:600;font-size:14px;flex:1}
.readme-actions{display:flex;align-items:center;gap:6px}

.tabnav{display:flex;border:1px solid var(--border);border-radius:6px;overflow:hidden}
.tabnav-tab{
  padding:5px 16px;font-size:13px;font-weight:500;
  color:var(--fg-muted);cursor:pointer;
  border:none;background:none;font-family:inherit;line-height:20px;
}
.tabnav-tab.on{color:var(--fg);background:var(--canvas)}
.tabnav-tab:hover:not(.on){color:var(--fg)}
.tabnav-tab+.tabnav-tab{border-left:1px solid var(--border)}

.readme-body{padding:32px 40px;min-height:180px}
.raw-view{display:none}
.raw-view pre{padding:16px;font-size:12px;line-height:1.7;color:var(--fg);white-space:pre-wrap;word-break:break-word;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,monospace}

/* ════════════ EMPTY STATE ════════════ */
.blankslate{text-align:center;padding:60px 24px;color:var(--fg-muted)}
.blankslate-icon{width:64px;height:64px;margin:0 auto 16px;border:1px solid var(--border);border-radius:50%;display:flex;align-items:center;justify-content:center}
.blankslate-icon svg{width:32px;height:32px;fill:var(--fg-muted)}
.blankslate h3{font-size:20px;font-weight:300;color:var(--fg);margin-bottom:8px}
.blankslate p{font-size:14px;max-width:440px;margin:0 auto;line-height:1.6}

/* ════════════ MARKDOWN ════════════ */
.markdown-body{font-size:16px;line-height:1.6;word-wrap:break-word}
.markdown-body h1{font-size:2em;font-weight:600;border-bottom:1px solid var(--border);padding-bottom:.3em;margin:0 0 16px}
.markdown-body h2{font-size:1.5em;font-weight:600;border-bottom:1px solid var(--border);padding-bottom:.3em;margin:24px 0 16px}
.markdown-body h3{font-size:1.25em;font-weight:600;margin:24px 0 16px}
.markdown-body h4{font-size:1em;font-weight:600;margin:24px 0 16px}
.markdown-body p{margin-bottom:16px}
.markdown-body ul,.markdown-body ol{padding-left:2em;margin-bottom:16px}
.markdown-body li+li{margin-top:4px}
.markdown-body hr{height:4px;padding:0;margin:24px 0;background:var(--border);border:0}
.markdown-body blockquote{padding:0 1em;color:var(--fg-muted);border-left:.25em solid var(--border);margin:0 0 16px}
.markdown-body code{padding:.2em .4em;font-size:85%;background:rgba(110,118,129,.4);border-radius:6px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,monospace}
.markdown-body pre{font-size:85%;overflow:auto;background:var(--canvas-sub);border-radius:6px;padding:16px;border:1px solid var(--border-sub);margin-bottom:16px;position:relative}
.markdown-body pre code{padding:0;font-size:100%;background:transparent;border:0;white-space:pre;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,monospace;color:var(--fg)}
.code-lang{position:absolute;top:8px;right:10px;font-size:11px;color:var(--fg-subtle);font-family:ui-monospace,monospace;background:var(--canvas);border:1px solid var(--border-sub);border-radius:4px;padding:1px 6px}
.markdown-body a{color:var(--accent);text-decoration:none}
.markdown-body a:hover{text-decoration:underline}
.markdown-body strong{font-weight:600}
.markdown-body img{max-width:100%;vertical-align:middle}
.markdown-body table{display:block;width:100%;overflow:auto;border-collapse:collapse;margin-bottom:16px}
.markdown-body th,.markdown-body td{padding:6px 13px;border:1px solid var(--border)}
.markdown-body thead tr{background:var(--canvas-sub)}
.stream-cursor{display:inline-block;width:2px;height:1.1em;background:var(--accent);vertical-align:text-bottom;animation:blink .8s step-end infinite;margin-left:1px}
@keyframes blink{50%{opacity:0}}

/* ════════════ SIDEBAR ════════════ */
.side-box{border:1px solid var(--border);border-radius:6px;overflow:hidden;margin-bottom:16px}
.side-row{padding:16px;border-bottom:1px solid var(--border-sub)}
.side-row:last-child{border-bottom:none}
.side-title{font-size:14px;font-weight:600;margin-bottom:10px;display:flex;align-items:center;justify-content:space-between}
.side-title svg{width:14px;height:14px;fill:var(--fg-muted)}
.side-desc{font-size:14px;line-height:1.5;color:var(--fg-muted);margin-bottom:10px}
.side-link{display:flex;align-items:center;gap:6px;color:var(--accent);font-size:14px;text-decoration:none;margin-bottom:8px;word-break:break-all}
.side-link:hover{text-decoration:underline}
.side-link svg{width:16px;height:16px;fill:var(--fg-muted);flex-shrink:0}
.topic-tag{display:inline-block;background:rgba(31,111,235,.1);color:var(--accent);border-radius:20px;padding:4px 12px;font-size:12px;font-weight:500;margin:3px;cursor:pointer}
.topic-tag:hover{background:rgba(31,111,235,.2)}
.stat-row{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--fg-muted);margin-bottom:8px}
.stat-row svg{width:16px;height:16px;fill:currentColor;flex-shrink:0}
.stat-row strong{color:var(--fg)}
.divider{border:none;border-top:1px solid var(--border-sub);margin:10px 0}
.lang-bar{display:flex;height:8px;border-radius:6px;overflow:hidden;margin-bottom:8px}
.lang-item{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--fg-muted);margin-bottom:5px}
.lang-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.lang-pct{margin-left:auto}

/* ════════════ TOAST ════════════ */
.Toast{position:fixed;bottom:24px;right:24px;z-index:9999;background:var(--canvas-sub);border:1px solid var(--border);border-radius:6px;padding:10px 16px;font-size:13px;display:flex;align-items:center;gap:8px;transform:translateY(80px);opacity:0;transition:transform .2s,opacity .2s;pointer-events:none;box-shadow:0 8px 24px rgba(0,0,0,.4)}
.Toast.on{transform:translateY(0);opacity:1}
.Toast svg{width:16px;height:16px;fill:var(--green);flex-shrink:0}

/* ════════════ RESPONSIVE ════════════ */
/* ── Responsive ── */
@media(max-width:1012px) {
  .col-side { display:none }
}

@media(max-width:768px) {
  /* Header */
  .gh-header-inner { gap:6px; padding:0 10px; }
  .gh-search-wrap { max-width:140px; }
  .gh-search-kbd { display:none; }
  .gh-nav { display:none; }
  .gh-icon-btn { display:none; }
  .githawk-btn { display:none !important; }
  .gh-avatar { display:flex; }

  /* Repo header */
  .repohead-inner { padding:0 10px; }
  .repohead-top { flex-wrap:wrap; gap:8px; }
  .repo-title { font-size:14px; }
  .repohead-actions { gap:4px; }
  .repohead-actions .btn-count { display:none; }
  .repohead-tabs { gap:0; overflow-x:auto; scrollbar-width:none; }
  .repohead-tabs::-webkit-scrollbar { display:none; }
  .gh-tab { font-size:13px; padding:8px 10px; white-space:nowrap; }

  /* Branch bar */
  .branch-bar { flex-wrap:wrap; gap:6px; padding:8px 10px; }
  .branch-bar-right { width:100%; justify-content:flex-start; gap:6px; }
  .branch-bar-right .btn { font-size:12px; padding:3px 10px; }

  /* Main layout */
  .container { padding:0 10px 20px; gap:12px; }
  .col-main { min-width:0; }

  /* Box */
  .Box-footer { padding:12px; }
  .how-steps { grid-template-columns:1fr 1fr; gap:16px; }
  .how-steps::before { display:none; }
  .step-num { width:32px; height:32px; font-size:13px; }

  /* Input */
  .input-wrap { flex-direction:column; gap:0; }
  .input-prefix { border-radius:6px 6px 0 0; border-bottom:none; }
  #repo-url { border-radius:0 0 6px 6px; font-size:13px; }

  /* Generate button row */
  .Box-footer > .btn-green { width:100%; justify-content:center; }

  /* README box */
  .readme-body { padding:12px; font-size:13px; }
  .readme-tabnav { flex-wrap:wrap; gap:4px; }

  /* Tab panels */
  .tab-panel .container { padding:10px; }
}

@media(max-width:480px) {
  .gh-logo-text { display:none; }
  .gh-search-wrap { flex:1; max-width:none; }
  .repohead-actions { display:none; }
  .how-steps { grid-template-columns:1fr; }
  .branch-bar .btn:first-child { display:flex; }
}

/* ════════════════════════════════════════
   NEW UI UPGRADES
════════════════════════════════════════ */

/* Logo text */
.gh-logo-text {
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -.2px;
}

/* Nav items as links */
.gh-nav .gh-nav-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--fg);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
  transition: background .1s;
}
.gh-nav .gh-nav-item:hover { background: rgba(177,186,196,.12); }
.gh-nav .gh-nav-item svg { opacity: .8; }

/* Search wrap */
.gh-search-wrap {
  flex: 1;
  max-width: 280px;
  position: relative;
}
.gh-search-box {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 6px;
  height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.gh-search-box:focus-within {
  border-color: var(--accent-em);
  box-shadow: 0 0 0 3px rgba(31,111,235,.3);
}
.gh-search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 13px;
  font-family: inherit;
}
.gh-search-box input::placeholder { color: var(--fg-subtle); }
.gh-search-kbd {
  border: 1px solid rgba(110,118,129,.4);
  border-radius: 6px;
  padding: 1px 5px;
  font-size: 11px;
  color: var(--fg-muted);
  background: transparent;
  font-family: monospace;
  flex-shrink: 0;
}

/* Search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--canvas-sub);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 500;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.search-dropdown-inner { padding: 6px 0; }
.search-hint {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--fg-muted);
}
.search-loading {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-section-header {
  padding: 6px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.search-repo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .08s;
  text-decoration: none;
  color: var(--fg);
}
.search-repo-item:hover { background: rgba(177,186,196,.08); }
.search-repo-item svg { flex-shrink: 0; fill: var(--fg-muted); }
.search-repo-info { flex: 1; min-width: 0; }
.search-repo-name { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-repo-desc { font-size: 11px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.search-repo-lang { font-size: 11px; color: var(--fg-muted); flex-shrink: 0; }
.search-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 4px;
  border-bottom: 1px solid var(--border-sub);
  margin-bottom: 4px;
}
.search-user-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.search-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.search-user-name { font-size: 13px; font-weight: 600; color: var(--fg); }
.search-user-repos { font-size: 11px; color: var(--fg-muted); margin-left: auto; }
.search-error { padding: 12px 14px; font-size: 13px; color: var(--danger); }

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* History / Saved items */
.readme-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-sub);
  transition: background .08s;
}
.readme-history-item:last-child { border-bottom: none; }
.readme-history-item:hover { background: rgba(177,186,196,.04); }
.rhi-icon { flex-shrink: 0; fill: var(--fg-muted); }
.rhi-info { flex: 1; min-width: 0; }
.rhi-repo { font-size: 14px; font-weight: 600; color: var(--accent); }
.rhi-meta { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }
.rhi-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Settings */
.key-status { font-size: 11px; color: var(--green); min-width: 40px; }

/* Mobile nav */
@media(max-width:768px) {
  .gh-nav { display: none; flex-direction: column; position: absolute; top: 62px; left: 0; right: 0; background: var(--canvas-sub); border-bottom: 1px solid var(--border); padding: 8px; z-index: 100; }
  .gh-nav.mobile-open { display: flex; }
  .gh-logo-text {
  text-decoration: none; display: none; }
  .gh-search-wrap { max-width: 160px; }
}

/* Logo — no underline ever */
.gh-logo { text-decoration: none !important; }
.gh-logo:hover { text-decoration: none !important; }
.gh-logo-text { text-decoration: none !important; }

/* GitHawk button */
.githawk-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 3px 8px !important;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent) !important;
  font-size: 12px;
  text-decoration: none !important;
  transition: background .1s, border-color .1s;
  white-space: nowrap;
  height: 28px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.githawk-btn:hover {
  background: rgba(88,166,255,.08);
  border-color: var(--accent);
  text-decoration: none !important;
}

/* Logo — no underline ever */
.gh-logo { text-decoration: none !important; }
.gh-logo:hover { text-decoration: none !important; }

/* Mobile hamburger open */
@media(max-width:768px) {
  .gh-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 62px; left: 0; right: 0;
    background: var(--canvas-sub);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    z-index: 300;
  }
}

/* Section toggles */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--fg);
  transition: border-color .1s;
  user-select: none;
}
.toggle-row:hover { border-color: var(--accent); }
.toggle-row input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* Project type badge in status */
.proj-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  background: var(--canvas-sub);
  margin-left: 8px;
}
