* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f9fefb 0%, #f3fcf6 50%, #f9fefb 100%);
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 16px 20px 40px;
}

.container {
  width: 100%;
  max-width: 720px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.5px;
}

.header p {
  font-size: 1rem;
  color: #64748b;
  margin-top: 8px;
}

.search {
  position: relative;
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.search-input-wrap {
  flex: 1;
  position: relative;
}

.search input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.search input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.search input::placeholder { color: #94a3b8; }

.search button {
  padding: 0;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.search button:active { transform: translateY(0); }

.search button:disabled {
  background: #86efac;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 10;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.93rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.12s;
}

.autocomplete-item .lang-icon {
  font-size: 1.2rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.autocomplete-item:first-child { border-radius: 12px 12px 0 0; }
.autocomplete-item:last-child { border-bottom: none; border-radius: 0 0 12px 12px; }
.autocomplete-item:only-child { border-radius: 12px; }

.autocomplete-item:hover,
.autocomplete-item.active { background: #f0fdf4; }

.autocomplete-item mark {
  background: #fef9c3;
  color: inherit;
  padding: 0;
  border-radius: 3px;
}

.autocomplete-item .match-detail {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-left: 8px;
}

.autocomplete-item .ac-tag {
  font-size: 0.72rem;
  color: #94a3b8;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.autocomplete-item .ac-name {
  flex: 1;
  min-width: 0;
}

.autocomplete-item .ac-lang {
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.autocomplete-item .ac-lang .lang-icon {
  font-size: 0.95rem;
  width: auto;
}

#error {
  color: #ef4444;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
}

#results { display: none; }

.results-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.repo-subtitle {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.5;
}

.repo-subtitle-desc {
  display: block;
  margin-top: 4px;
}

.repo-subtitle-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.repo-subtitle-stars {
  color: #64748b;
}

.repo-subtitle-sep {
  color: #cbd5e1;
  margin: 0 2px;
}

.repo-subtitle-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.repo-topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ddf4ff;
  color: #0969da;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 2em;
  line-height: 1.5;
  text-decoration: none;
}

.repo-topic-badge:hover {
  background: #b6e3ff;
}

#results-title-text .repo-topic-badge {
  font-size: 0.85rem;
}

.repo-topics-toggle-btn {
  font-weight: 600;
  user-select: none;
}

.owner-top-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.owner-top-topics-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-right: 2px;
}

@media (max-width: 600px) {
  .owner-top-topics .repo-topic-badge:nth-of-type(n+4) {
    display: none;
  }
}

.owner-icon {
  margin-right: 6px;
}

.owner-icon.no-icon {
  display: none;
}

.owner-link {
  color: #16a34a;
  text-decoration: none;
}

.owner-link:hover {
  text-decoration: underline;
}

.title-version {
  font-weight: 400;
  font-size: 0.85em;
}

.results-title-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #1e293b;
  padding: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  position: relative;
}

.copy-link-btn:hover {
  color: #16a34a;
}

.copy-link-btn.copied {
  color: #16a34a;
}

.copy-link-btn.copied::after {
  content: 'Copied!';
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}

.version-select {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: #64748b;
  transition: border-color 0.15s, color 0.15s;
  max-width: 160px;
}

.version-select:hover, .version-select:focus {
  border-color: #bbf7d0;
  color: #16a34a;
  outline: none;
}

.version-select-loading {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  vertical-align: middle;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 20px 0 8px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::after {
  content: '▾';
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.2s;
  display: inline-block;
}

.section-title.collapsed::after {
  transform: rotate(-90deg);
}

.stats-grid {
  margin-bottom: 8px;
}

#terms-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin-top: 12px;
}

.overview-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.dash-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.dash-card-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.dash-card-value {
  font-size: 1.4rem;
  color: #1e293b;
  line-height: 1;
}

.dash-card.clickable {
  cursor: pointer;
}

.dash-card.clickable:hover {
  filter: brightness(0.96);
  border-color: #cbd5e1;
}

.dash-card.active {
  filter: brightness(0.93);
  border-color: #94a3b8;
}

.stat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dep-table {
  width: 100%;
  border-collapse: collapse;
}

.dep-table tr:not(:last-child) td {
  border-bottom: 1px solid #f1f5f9;
}

.dep-eco-cell {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.03em;
  white-space: nowrap;
  vertical-align: middle;
  text-align: left;
  padding: 8px 16px 8px 0;
  width: 130px;
  min-width: 130px;
}

.dep-badges-cell {
  vertical-align: middle;
  padding: 8px 0;
}

.dep-badges-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.dep-badges-row .dep-badges {
  flex: 1;
}

.dep-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dep-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 400;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  cursor: pointer;
  transition: background 0.15s;
}

.dep-badge:hover {
  background: #dcfce7;
}

.test-term-badge {
  padding: 2px 8px;
  font-size: 0.75rem;
}

.test-term-badge.active {
  background: #bbf7d0;
  border-color: #4ade80;
}

.test-terms-toggle-btn {
  padding: 2px 8px;
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #000;
  border-color: #cbd5e1;
  flex-shrink: 0;
  align-self: flex-start;
}

.test-terms-toggle-btn:hover {
  background: #e2e8f0;
}

.no-data-msg {
  display: block;
  padding: 12px 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.dep-ecosystem-icon {
  margin-right: 5px;
  font-size: 1rem;
}

.stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #22c55e;
  text-align: right;
  white-space: nowrap;
}

.gh-token-btn {
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: #64748b;
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.gh-token-btn:hover {
  color: #22c55e;
  border-color: #22c55e;
  background: #f0fdf4;
}

.gh-token-btn.has-token {
  color: #22c55e;
  border-color: #22c55e;
}

.file-list-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-list-modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.18);
  width: 660px;
  max-width: 92vw;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-list-modal-header {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.file-list-modal ul {
  list-style: none;
  padding: 8px 16px;
  margin: 0;
  overflow-y: auto;
  overflow-x: auto;
}

.file-list-modal li {
  font-size: 0.82rem;
  color: #1e293b;
  padding: 4px 0;
  font-family: monospace;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.file-list-modal li a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.file-list-modal li a:hover {
  color: #22c55e;
}

.file-list-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #94a3b8;
  padding: 0 4px;
  line-height: 1;
}

.file-list-close:hover {
  color: #ef4444;
}

.file-list-copy-link {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.75rem;
  color: #64748b;
  padding: 2px 8px;
  line-height: 1.5;
  margin-left: auto;
  white-space: nowrap;
}

.file-list-copy-link:hover {
  border-color: #22c55e;
  color: #22c55e;
}

.file-list-copy-link.copied {
  color: #22c55e;
  border-color: #22c55e;
}


.repo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.repo-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.repo-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: #bbf7d0;
}

.repo-item-name {
  font-size: 1rem;
  font-weight: 600;
  color: #16a34a;
}

.repo-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.82rem;
  color: #64748b;
}

.repo-item-stars {
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}

.repo-item-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.repo-topic {
  font-size: 0.75rem;
  background: #f0fdf4;
  color: #16a34a;
  border-radius: 6px;
  padding: 3px 8px;
  font-weight: 500;
}

.repo-item-stats {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: #64748b;
}

.repo-item-stats span {
  font-weight: 500;
}

.repo-item-stats .stat-value {
  color: #22c55e;
  font-weight: 700;
}

.owner-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  grid-column: 1 / -1;
}

.owner-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  white-space: nowrap;
}

.owner-table th {
  text-align: left;
  padding: 10px 16px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: 1%;
  white-space: nowrap;
}

.owner-table th:first-child {
  width: 120px;
  white-space: normal;
}

.repo-name-cell {
  max-width: 120px;
  white-space: normal;
  word-break: break-all;
}

[class*="devicon-"] {
  font-size: 1rem;
}

.owner-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  font-size: 0.82rem;
}

.owner-table th:nth-child(n+3):nth-child(-n+6),
.owner-table td:nth-child(n+3):nth-child(-n+6) {
  text-align: right;
}

.owner-table-row {
  cursor: pointer;
  transition: background 0.12s;
}

.owner-table-row:hover {
  background: #f0fdf4;
}

.repo-name-cell {
  font-weight: 600;
  color: #16a34a;
  width: 180px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.suggestion-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.suggestion-btn {
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.suggestion-btn:hover {
  background: #dcfce7;
  border-color: #bbf7d0;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e2e8f0;
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.sortable-th {
  cursor: pointer;
  user-select: none;
}

.sortable-th:hover {
  color: #16a34a;
}

.sort-arrow {
  font-size: 0.7rem;
}

@media (max-width: 600px) {
  .owner-table th,
  .owner-table td {
    padding: 8px 6px;
    font-size: 0.72rem;
  }
  .owner-table th:first-child {
    width: 120px;
  }
  .repo-name-cell {
    max-width: 120px;
    white-space: normal;
    word-break: break-all;
  }
  .owner-table th .th-label span {
    display: block;
  }
  .lang-text {
    display: none;
  }
  .lang-text.no-icon {
    display: inline;
  }
  .autocomplete-item .ac-lang:has(.lang-icon) .ac-lang-name {
    display: none;
  }
  .results-title {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  #results-title-text {
    flex: 1;
    text-align: left;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .results-title-actions {
    margin-left: auto;
  }
  #gh-link {
    order: 1;
  }
  #copy-link-btn {
    order: 2;
  }
  #share-btn {
    order: 3;
  }
  .results-title {
    font-size: 1.45rem;
  }
  .results-title i,
  .results-title svg {
    font-size: 1.45rem;
    width: 1.45rem;
    height: 1.45rem;
  }
  #results-title-text .repo-topic-badge {
    font-size: 1.1rem;
  }
  #results-title-text .repo-topic-badge .lang-icon {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    line-height: 1;
  }
  #results-title-text .owner-top-topics-label {
    font-size: 1.1rem;
  }
  #version-select {
    display: none !important;
  }
}

.th-short { display: none; }

@media (max-width: 600px) {
  .has-short-label .th-full { display: none; }
  .has-short-label .th-short { display: inline; }

}

#version-chart-container {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}

#tree-chart {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  max-height: 600px;
  overflow-y: auto;
}

#deps-container {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}

.tree-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.block-map {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.block-dir {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.block-map.hide-paths .block-dir-label {
  display: none;
}

.block-dir-count {
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
}

.block-dir-label {
  font-size: 0.72rem;
  font-family: monospace;
  color: #64748b;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.block-cell {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  cursor: default;
  transition: transform 0.1s, border-radius 0.15s;
  position: relative;
}

.block-map.circles .block-cell {
  border-radius: 50%;
}

.block-map.clickable .block-cell {
  cursor: pointer;
}

.block-cell:hover {
  transform: scale(1.8);
  z-index: 10;
}

.block-tooltip {
  position: fixed;
  pointer-events: none;
  background: #1e293b;
  color: #fff;
  font-size: 0.65rem;
  font-family: monospace;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.1s;
}

.block-tooltip.visible {
  opacity: 1;
}

.block-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.75rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.block-sort-btn {
  font-size: 0.73rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.block-sort-btn:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

.block-sort-btn.active {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.block-sort-sep {
  color: #e2e8f0;
  margin: 0 2px;
}

.block-separator {
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 12px;
}

.depth-nav-label {
  font-family: monospace;
  font-size: 0.73rem;
  color: #64748b;
}

.export-btns {
  display: flex;
  gap: 4px;
}

.export-png-btn {
  width: 22px;
  height: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
  padding: 0;
  color: #64748b;
}

.export-png-btn:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.export-png-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.export-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.export-title i {
  font-size: 1.3rem;
}

.export-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.shape-toggle {
  width: 22px;
  height: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
  padding: 0;
}

.shape-toggle:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.shape-toggle.active {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.shape-toggle-icon {
  width: 10px;
  height: 10px;
  background: #64748b;
  border-radius: 2px;
  transition: border-radius 0.15s;
}

.shape-toggle.active .shape-toggle-icon {
  border-radius: 50%;
}

/* --- Top Navigation --- */

.top-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding-top: 4px;
  padding-bottom: 12px;
  margin-bottom: 40px;
}

.nav-link {
  font-size: 1rem;
  color: #64748b;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-link-github {
  gap: 6px;
}

/* --- GitHub Token Modal --- */

.token-modal {
  max-height: none;
}

.token-modal-body {
  padding: 16px;
}

.token-description {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 8px;
}

.token-links {
  font-size: 0.82rem;
  margin: 0 0 12px;
}

.token-link {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 600;
}

.token-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.token-buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.token-save-btn {
  flex: 1;
  padding: 8px;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  font-weight: 500;
}

.token-remove-btn {
  padding: 8px 14px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}

/* --- GitHub Link in Subtitle --- */

.gh-link {
  color: #1e293b;
  text-decoration: none;
}


/* --- Share Button --- */

.share-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #1e293b;
  padding: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.share-btn:hover {
  color: #16a34a;
}

/* --- Tree Chart Spacing --- */

#tree-chart {
  margin-top: 16px;
}

/* --- Version Chart --- */

.version-chart-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

#version-metric-btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

#version-chart-type-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

#version-chart-type-btns .block-sort-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  justify-content: center;
}


.version-chart-wrap {
  position: relative;
  height: 300px;
}

.version-chart-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 2;
  align-items: center;
  justify-content: center;
}

/* --- Footer --- */

.footer-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 24px 0 0 0;
}

.footer-text {
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}

.footer-text:first-of-type {
  padding: 16px 0 0;
}

.footer-text + .footer-text {
  padding: 8px 0 0;
}

.footer-link {
  color: #64748b;
  text-decoration: underline;
}

.footer-token-wrap {
  text-align: center;
  padding: 8px 0 12px;
  margin: 0;
}

/* --- File List Modal Details --- */

.file-list-modal-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

