:root {
  color-scheme: light;
  --canvas: #ffffff;
  --subtle: #f6f8fa;
  --border: #d8dee4;
  --text: #24292f;
  --muted: #57606a;
  --link: #0969da;
  --green: #1f883d;
  --button: #f6f8fa;
}

* { box-sizing: border-box; }

[v-cloak] { display: none; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

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

button, input {
  font: inherit;
}

.repo-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.repo-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f0f3ff;
  border: 1px solid var(--border);
  color: #665cff;
  font-size: 11px;
  font-weight: 700;
}

.repo-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.repo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost, .branch, .code-button {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--button);
  color: var(--text);
  padding: 0 12px;
  font-weight: 600;
}

.ghost span {
  color: var(--muted);
  margin-left: 4px;
}

.starred {
  background: #fff8c5;
}

.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 32px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.branch {
  min-width: 90px;
}

.meta {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.toolbar-spacer { flex: 1; }

.search {
  width: 260px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--canvas);
  padding: 0 12px;
  color: var(--muted);
}

.code-button {
  border-color: rgba(31, 136, 61, .65);
  background: var(--green);
  color: #fff;
}

.file-card, .readme-card, .side-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--canvas);
}

.commit-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  background: var(--subtle);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.commit-row strong {
  color: var(--text);
}

.commit-id {
  color: var(--muted);
}

.file-row {
  min-height: 40px;
  display: grid;
  grid-template-columns: 24px minmax(180px, .6fr) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.file-row:last-child {
  border-bottom: 0;
}

.file-row:hover {
  background: var(--subtle);
  text-decoration: none;
}

.file-row strong {
  color: var(--text);
  font-weight: 600;
}

.file-row em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

.file-icon {
  width: 16px;
  height: 20px;
  border: 2px solid #6e7781;
  border-radius: 2px;
  position: relative;
}

.file-icon.folder {
  width: 18px;
  height: 14px;
  border: 0;
  border-radius: 3px;
  background: #54aeff;
}

.file-icon.folder::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 1px;
  width: 8px;
  height: 5px;
  border-radius: 2px 2px 0 0;
  background: #54aeff;
}

.readme-card {
  margin-top: 18px;
}

.readme-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--subtle);
  border-bottom: 1px solid var(--border);
}

.readme-head span {
  color: var(--muted);
}

.readme {
  padding: 32px;
}

.readme h1 {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 32px;
  line-height: 1.25;
}

.readme h2 {
  margin: 26px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 24px;
  line-height: 1.25;
}

.readme p {
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.7;
}

code {
  padding: .2em .4em;
  border-radius: 6px;
  background: rgba(175, 184, 193, .2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 85%;
}

pre {
  margin: 12px 0 16px;
  padding: 16px;
  overflow: auto;
  border-radius: 6px;
  background: #f6f8fa;
}

pre code {
  padding: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.55;
}

.side-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.side-card {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 0 18px;
}

.side-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.side-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.side-card ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.side-card a {
  display: block;
  margin: 9px 0;
  font-weight: 600;
}

.release {
  color: var(--text);
}

.release span {
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid #1a7f37;
  border-radius: 999px;
  color: #1a7f37;
  font-size: 12px;
}

.language-bar {
  display: flex;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  margin: 10px 0;
}

.language-bar i { display: block; }
.language-bar .go { width: 95.4%; background: #00add8; }
.language-bar .shell { width: 4.1%; background: #89e051; }
.language-bar .other { width: .5%; background: #ededed; }

.language-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 980px) {
  .repo-shell, .layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .repo-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .toolbar-spacer {
    display: none;
  }

  .search {
    width: 100%;
  }

  .file-row {
    grid-template-columns: 24px 1fr auto;
  }

  .file-row span:nth-child(3) {
    display: none;
  }

  .commit-row {
    grid-template-columns: auto 1fr;
  }

  .commit-id,
  .commit-row span:last-child {
    display: none;
  }

  .readme {
    padding: 22px;
  }
}
