﻿:root {
  --bg: #f6f8fa;
  --panel: #ffffff;
  --border: #d0d7de;
  --muted: #57606a;
  --text: #24292f;
  --top: #24292f;
  --top-text: #f0f6fc;
  --link: #0969da;
  --row-hover: #f3f4f6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.site-top {
  background: var(--top);
  color: var(--top-text);
  border-bottom: 1px solid #1b1f24;
}

.site-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-weight: 600;
  font-size: 14px;
}

.brand-sub {
  font-size: 12px;
  color: #8b949e;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.repo-head {
  margin-bottom: 12px;
}

.repo-name {
  font-size: 20px;
  font-weight: 600;
}

.repo-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.toolbar {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.btn {
  border: 1px solid var(--border);
  background: #f6f8fa;
  color: var(--text);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.btn:hover {
  background: #eef1f4;
}

.crumbs {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
}

.crumb-link {
  border: 0;
  background: transparent;
  color: var(--link);
  padding: 0;
  cursor: pointer;
  font-size: inherit;
}

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

.sep,
.crumb-current {
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}

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

.list-table thead {
  background: #f6f8fa;
}

.list-table th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.list-table th.num {
  text-align: right;
  width: 120px;
}

.list-table td {
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  padding: 8px 12px;
}

.list-table tr:last-child td {
  border-bottom: 0;
}

.list-table tr:hover td {
  background: var(--row-hover);
}

.entry-btn {
  border: 0;
  background: transparent;
  color: var(--link);
  padding: 0;
  cursor: pointer;
  font-size: 14px;
}

.entry-btn:hover {
  text-decoration: underline;
}

.entry-icon {
  color: var(--muted);
  margin-right: 8px;
}

.size {
  text-align: right;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.file-title {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #f6f8fa;
}

.code-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: 380px;
  max-height: 70vh;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.line-nums,
.viewer {
  margin: 0;
  padding: 12px;
  white-space: pre;
  font-size: 12px;
  line-height: 1.5;
}

.line-nums {
  text-align: right;
  color: #8c959f;
  border-right: 1px solid var(--border);
  user-select: none;
}

.viewer {
  color: var(--text);
  overflow: visible;
}

@media (max-width: 760px) {
  .page {
    padding: 10px;
  }

  .list-table th.num,
  .list-table td.size {
    width: 86px;
  }

  .repo-name {
    font-size: 18px;
  }
}
