:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --white: #fff;
  --ink: #192825;
  --muted: #5f6d69;
  --line: #dde5e1;
  --accent: #12694e;
  --accent-soft: #e4f3eb;
  --rail: #172529;
  --rail-line: #2c3e42;
  --rail-muted: #a5b6b8;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font: 100%/1.6 var(--sans);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid #229d72; outline-offset: 3px; }
.icon { display: inline-block; flex: none; vertical-align: middle; }
.skip-link { position: fixed; z-index: 9; top: -60px; left: 16px; padding: 8px 12px; background: white; }
.skip-link:focus { top: 8px; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 230px; background: var(--rail);
  color: #eef6f3; display: flex; flex-direction: column; padding: 23px 15px; overflow: auto;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 720; letter-spacing: .03em; }
.sidebar .brand { margin: 0 8px 35px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #17332b; background: #9ce6bb; }
.rail-label { font-size: .75rem; font-weight: 680; color: var(--rail-muted); padding: 0 11px; margin: 0 0 7px; }
.rail-links { display: grid; gap: 4px; }
.rail-links a { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 7px; color: #d5e2e1; font-size: .875rem; }
.rail-links a:hover { background: #233639; }
.rail-links a[aria-current="page"] { background: #2d4344; color: #edfff2; }
.rail-links a[aria-current="page"] .icon { color: #a0e9c3; }
.rail-links a > span:last-child { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.rail-section + .rail-section { margin-top: 27px; }
.rail-footer { border-top: 1px solid var(--rail-line); color: var(--rail-muted); margin-top: auto; padding: 15px 9px 0; font-size: .8rem; overflow-wrap: anywhere; }
.rail-footer .icon { margin-right: 6px; }
.small-header { display: none; }
.workspace { margin-left: 230px; }
.topbar { min-height: 63px; padding: 0 33px; border-bottom: 1px solid var(--line); display: flex; align-items: center; background: var(--white); }
.crumbs { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .875rem; min-width: 0; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs strong { color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.separator { color: #83938e; }
.main { max-width: 1360px; margin: 0 auto; padding: 36px 34px 60px; }
.main:focus { outline: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.035em; line-height: 1.18; margin-bottom: 8px; overflow-wrap: anywhere; }
.page-head { margin-bottom: 27px; }
.page-head p, .project-desc { color: var(--muted); margin-bottom: 0; }
.page-head p { font-size: .94rem; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.list-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1 1 260px; min-width: 0; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; padding: 8px 12px 8px 35px; border: 1px solid #d3ddd7; border-radius: 7px; background: #fcfdfc; color: var(--ink); }
select { appearance: none; padding: 8px 34px 8px 11px; border: 1px solid #d3ddd7; border-radius: 7px; color: var(--ink); background: var(--white); }
.select-wrap { display: inline-flex; position: relative; min-width: 0; }
.select-wrap .icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.list-count { padding: 9px 17px; border-bottom: 1px solid var(--line); color: var(--muted); background: #fbfcfb; font-size: .82rem; }
.repo-list, .commit-list { padding: 0; margin: 0; list-style: none; }
.repo-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 14px; padding: 18px 18px; }
.repo-row + .repo-row, .commit-row + .commit-row { border-top: 1px solid var(--line); }
.repo-row:hover, .tree-row:hover { background: #f8fbf9; }
.repo-row .repo-link { font-size: 1rem; font-weight: 720; color: var(--accent); overflow-wrap: anywhere; }
.repo-link:hover, .file-name:hover { text-decoration: underline; }
.namespace { color: var(--muted); font-weight: 500; }
.repo-row p { color: var(--muted); font-size: .875rem; margin: 3px 0 0; overflow-wrap: anywhere; }
.repo-meta { text-align: right; display: grid; gap: 4px; font-size: .79rem; color: var(--muted); white-space: nowrap; }
.lang { display: inline-flex; align-items: center; gap: 6px; }
.lang-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lang, #5c9080); }
.avatar { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 10px; font: 720 .99rem var(--mono); color: #15543d; background: #e2f2e9; }
.avatar[data-color="1"] { color: #4b4084; background: #eae6fa; }
.avatar[data-color="2"] { color: #775527; background: #f8ecca; }
.avatar[data-color="3"] { color: #285489; background: #e5effb; }
.avatar-large { width: 58px; height: 58px; border-radius: 13px; font-size: 1.3rem; }
.project-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.project-title { display: flex; gap: 14px; align-items: start; min-width: 0; }
.project-title h1 { margin-bottom: 5px; }
.project-title .namespace { font-size: .81rem; }
.project-desc { font-size: .92rem; margin: 6px 0 0; overflow-wrap: anywhere; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #d3ddd7; border-radius: 7px; background: white; color: var(--ink); font-size: .875rem; font-weight: 650; padding: 7px 12px; white-space: nowrap; }
.button:hover { background: #f1f7f3; }
.primary { border-color: var(--accent); background: var(--accent); color: white; }
.primary:hover { background: #0d5942; }
.repo-tabs { display: flex; align-items: center; gap: 22px; padding-left: 1px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.repo-tabs a { display: flex; align-items: center; gap: 7px; padding: 8px 1px 10px; border-bottom: 2px solid transparent; color: var(--muted); font-size: .875rem; }
.repo-tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); font-weight: 700; }
.repo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 245px); gap: 20px; align-items: start; }
.repo-content { min-width: 0; }
.repo-content > * + * { margin-top: 15px; }
.repo-info { padding: 16px; }
.repo-info h2, .panel-heading { font-size: .9rem; margin: 0; font-weight: 720; }
.repo-info dl { margin: 12px 0 0; display: grid; gap: 11px; }
.repo-info dt { color: var(--muted); font-size: .78rem; }
.repo-info dd { margin: 1px 0 0; font-size: .875rem; }
.repo-info code { overflow-wrap: anywhere; }
.branch-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 13px; }
.branch-bar label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }
.branch-bar .select-wrap select { max-width: min(240px, 58vw); font-size: .875rem; }
.branch-bar .crumbs { overflow-wrap: anywhere; }
.branch-bar .crumbs a { color: var(--accent); }
.commit-summary { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 11px 14px; background: #f1f6f3; border-bottom: 1px solid var(--line); font-size: .875rem; }
.commit-summary > span { min-width: 0; display: flex; align-items: center; gap: 8px; }
.commit-summary strong { overflow-wrap: anywhere; font-weight: 640; }
.hash { color: #475b56; font: .78rem var(--mono); border: 1px solid var(--line); border-radius: 5px; background: #f9fbfa; padding: 4px 6px; white-space: nowrap; }
.tree-row { display: flex; align-items: center; justify-content: space-between; min-height: 42px; gap: 14px; padding: 6px 14px; font-size: .875rem; }
.tree-row + .tree-row { border-top: 1px solid #e9eeeb; }
.file-name { display: flex; align-items: center; gap: 9px; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.file-name .icon { color: #4a7669; }
.file-size { color: var(--muted); white-space: nowrap; font-size: .79rem; }
.panel-heading { display: flex; gap: 8px; align-items: center; background: #f8faf9; border-bottom: 1px solid var(--line); padding: 11px 14px; overflow-wrap: anywhere; }
.markdown { padding: 22px 22px 25px; overflow-wrap: anywhere; font-size: .92rem; }
.markdown h2 { font-size: 1.45rem; margin: 0 0 12px; line-height: 1.3; }
.markdown h3 { font-size: 1.1rem; margin: 19px 0 8px; }
.markdown p, .markdown ul, .markdown ol { margin: 0 0 13px; }
.markdown li + li { margin-top: 3px; }
.markdown > :last-child { margin-bottom: 0; }
.markdown a { color: var(--accent); text-decoration: underline; }
.markdown p code, .markdown li code { background: #ecf2ee; border-radius: 4px; padding: 1px 4px; font-size: .87em; }
.markdown pre { margin: 12px 0; overflow: auto; background: #172529; color: #e5f4eb; padding: 12px 14px; border-radius: 7px; font-size: .83rem; }
.code { overflow: auto; margin: 0; padding: 12px 0; font-size: .84rem; counter-reset: line; }
.line { display: flex; min-width: max-content; padding-right: 16px; min-height: 1.55em; }
.line::before { counter-increment: line; content: counter(line); display: inline-block; min-width: 44px; padding-right: 12px; text-align: right; margin-right: 12px; border-right: 1px solid var(--line); color: var(--muted); user-select: none; }
.commit-row { padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; gap: 14px; overflow-wrap: anywhere; }
.commit-row strong { display: block; font-size: .9rem; }
.commit-byline { color: var(--muted); font-size: .8rem; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; margin: 0; }
.loading { color: var(--muted); }
dialog { padding: 0; width: min(530px, calc(100vw - 28px)); max-height: 90vh; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); box-shadow: 0 28px 90px #1725295c; }
dialog::backdrop { background: #13252280; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 15px 18px; }
.dialog-head h2 { margin: 0; font-size: 1.03rem; }
.icon-button { display: grid; place-items: center; width: 33px; height: 33px; border: none; background: transparent; border-radius: 6px; }
.icon-button:hover { background: var(--accent-soft); }
.dialog-content { padding: 18px; }
.clone-note { color: var(--muted); font-size: .875rem; margin: 0 0 12px; }
.copy-field { display: flex; gap: 8px; margin-bottom: 11px; }
.copy-field input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: #f8faf9; color: var(--ink); font: .79rem var(--mono); }
.dialog-content pre { margin: 0; border-radius: 7px; background: #172529; color: #e6f5ed; padding: 9px 11px; font-size: .8rem; overflow: auto; }
.dialog-status { color: var(--accent); margin: 8px 0 0; font-size: .83rem; }
.dialog-status:empty { display: none; }
@media (max-width: 1020px) {
  .repo-grid { grid-template-columns: minmax(0, 1fr); }
  .repo-info dl { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .small-header { display: flex; align-items: center; padding: 9px 16px; background: var(--rail); color: white; }
  .small-header .brand-mark { width: 33px; height: 33px; }
  .topbar { min-height: 46px; padding: 7px 17px; }
  .main { padding: 25px 16px 42px; }
}
@media (max-width: 420px) {
  .repo-row { padding: 13px 12px; column-gap: 9px; row-gap: 8px; }
  .repo-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; grid-column: 2; text-align: start; }
  .repo-row .avatar { align-self: start; }
  .project-head { flex-wrap: wrap; }
  .avatar-large { width: 45px; height: 45px; }
  .markdown { padding: 16px; }
}
