:root{color-scheme:light;--paper:#f0ecdf;--panel:#f8f6ed;--ink:#303c2c;--muted:#68705f;--line:#b9bfad;--accent:#52634a;font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper);-webkit-font-smoothing:antialiased}

*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
body::before{content:"";position:fixed;inset:0;z-index:-1;background:url("../assets/paper.jpg") repeat;background-size:480px;filter:grayscale(1);opacity:.38;mix-blend-mode:multiply;pointer-events:none}
a{color:inherit}
header a,footer a{text-decoration:none}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;border:1px solid var(--line);background:var(--panel);padding:10px 15px;border-radius:4px;font-size:13px;min-height:42px}
button:hover{border-color:var(--ink)}
button:disabled{opacity:.45;cursor:default}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
input,select{border:1px solid var(--line);border-radius:4px;background:#fffdf7;min-height:42px;padding:9px 12px;min-width:0}
input::placeholder{color:var(--muted)}
header,main{width:min(1080px,calc(100% - 72px));margin-inline:auto}
header{height:66px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);font-size:12px}
.brand{font:20px Georgia,"Songti SC",serif}
.intro{padding:46px 0 28px}
.eyebrow{font:10px Georgia,serif;letter-spacing:.18em;margin:0 0 16px;color:var(--accent)}
h1,h2,h3{font-family:"Songti SC","STSong",Georgia,serif}
h1{font-size:clamp(30px,4.5vw,46px);font-weight:500;letter-spacing:.025em;margin:0 0 15px}
h1 span{color:#8c7a43;display:inline-block;margin-left:22px}
p{line-height:1.8}
.intro>p:last-child{font-size:14px;color:var(--muted);margin:0}
.query-panel{padding:24px;background:var(--panel);border:1px solid var(--line);border-top:3px double var(--accent)}
label{font-size:12px}
.username-label{display:block;margin-bottom:9px}
.query-row{display:flex;gap:10px;align-items:center}
.prefix{font:16px Georgia,serif;color:var(--muted);white-space:nowrap}
.query-row input{flex:1;width:100%}
.primary{background:var(--accent);border-color:var(--accent);color:#fff;min-width:130px}
.token-options{margin-top:18px;font-size:12px;color:var(--muted)}
summary{cursor:pointer;min-height:28px;line-height:1.8}
.token-options>label:not(.checkbox){display:block;margin:14px 0 8px}
.token-options>input{width:100%;max-width:560px}
.token-options p{margin:7px 0 12px}
.checkbox{display:flex;align-items:center;gap:7px}
.checkbox input{min-height:20px;width:16px;height:16px}
.status-row{display:flex;gap:16px;align-items:center;justify-content:space-between;margin-top:18px}
#status{font-size:12px;margin:0;overflow-wrap:anywhere}
#status[data-error="true"]{color:#9c352a}
.status-row button{white-space:nowrap;background:none;padding:4px 10px;min-height:32px}
progress{width:100%;height:5px;margin-top:16px;accent-color:var(--accent)}
.result-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:30px}
.result-heading h2{font:22px Georgia,serif;margin:0;overflow-wrap:anywhere}
.result-actions{display:flex;gap:8px}
.result-actions button{background:transparent;font-size:11px}
.metrics{display:grid;grid-template-columns:repeat(4,1fr);margin:22px 0 30px;border-block:1px solid var(--line)}
.metrics>div{padding:22px 24px;border-right:1px solid var(--line)}
.metrics>div:first-child{padding-left:0}
.metrics>div:last-child{border:0}
.metrics span{font-size:12px;color:var(--muted);display:block;margin-bottom:10px}
.metrics strong{font:38px Georgia,serif}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
.section-heading h2{font-size:23px;font-weight:500;margin:0}
.section-heading p{font-size:11px;color:var(--muted);margin:0}
.charts{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}
.chart-panel{padding:22px;background:var(--panel);border:1px solid var(--line);min-width:0}
.full-width{grid-column:1/-1}
.plot{width:100%;min-height:160px;overflow:hidden}
#owner-chart,#language-chart,#topic-chart{min-height:0}
.chart-panel .section-heading{margin-bottom:12px}
.chart-panel .section-heading h3{margin:0}
.sankey-scroll{width:100%;overflow-x:auto;overscroll-behavior-x:contain}
#sankey-chart{min-width:800px}
.sankey-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.plot .modebar{background:var(--panel)!important}
.chart-panel h3{font-size:18px;font-weight:500;margin:0 0 20px}
.chart-panel small{font:9px Georgia,serif;letter-spacing:.08em;color:var(--muted);margin-left:8px}
.period-label{display:flex;gap:6px;align-items:center;color:var(--muted)}
.period-label select{padding:4px 7px;min-height:32px;font-size:12px}
.hint{font-size:11px;color:var(--muted);line-height:1.8}
.list-heading{margin-top:32px}
.filters{display:flex;align-items:flex-end;gap:12px;margin:18px 0}
.filters label{display:grid;gap:7px;min-width:0}
.filters .search-field{flex:1}
.filters input{width:100%}
.filters select{width:100%;font-size:12px}
.repos{border-top:3px double var(--line)}
.repo{display:grid;grid-template-columns:1fr auto;gap:12px;padding:22px 0;border-bottom:1px solid var(--line)}
.repo h3{font:600 16px/1.6 -apple-system,"PingFang SC",sans-serif;overflow-wrap:anywhere;margin:0}
.repo h3 a{text-decoration:none}
.repo h3 a:hover{text-decoration:underline}
.repo .description{font-size:13px;color:var(--muted);margin:7px 0 10px;overflow-wrap:anywhere;max-width:760px}
.repo-meta{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:11px;color:var(--muted);line-height:1.8}
.repo-stars{font:16px Georgia,serif;white-space:nowrap;padding-top:4px}
.repo-topics{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.repo-topics span,.archive-badge{font-size:10px;padding:3px 7px;background:#e6e9db;border-radius:3px;overflow-wrap:anywhere}
.archive-badge{color:#86623c;background:#ece3cd;margin-left:9px;font-weight:400;white-space:nowrap}
.pagination{display:flex;align-items:center;justify-content:center;gap:20px;margin:22px 0;font-size:12px}
.pagination button{background:transparent}
.empty{padding:30px 0;text-align:center;font-size:13px;color:var(--muted)}
.welcome{text-align:center;padding:55px 0 45px}
.welcome>span{color:#8c7a43;font:50px Georgia,serif}
.welcome h2{font-size:24px;font-weight:500;margin:12px 0}
.welcome p{font-size:13px;color:var(--muted);margin:4px}
.welcome .hint{font-size:11px;margin-top:20px}
.notes{border-top:1px solid var(--line);padding:20px 0;color:var(--muted);font-size:12px;margin-top:20px}
.notes p{max-width:850px}
.notes a{text-underline-offset:3px}
footer{display:flex;justify-content:space-between;padding:20px 0 30px;border-top:1px solid var(--line);font-size:10px;color:var(--muted)}

@media(max-width:760px){header,main{width:calc(100% - 36px)}
header{height:58px}
.intro{padding:30px 0 22px}
h1 span{margin-left:12px}
.intro>p:last-child{font-size:12px}
.query-panel{padding:18px}
.prefix{display:none}
.query-row{flex-wrap:wrap}
.query-row input{flex-basis:100%}
.query-row .primary{flex:1}
.status-row{align-items:flex-start}
.result-heading{align-items:flex-start;flex-direction:column}
.result-actions button{min-height:36px}
.metrics{grid-template-columns:repeat(2,1fr);margin-top:18px}
.metrics>div{padding:18px!important}
.metrics>div:nth-child(2){border-right:0}
.metrics>div:nth-child(-n+2){border-bottom:1px solid var(--line)}
.metrics strong{font-size:32px}
.section-heading{flex-wrap:wrap;gap:6px}
.section-heading h2{font-size:21px}
.charts{grid-template-columns:1fr}
.chart-panel{padding:20px}
.filters{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.filters .search-field{grid-column:1/-1}
.filters button{align-self:end}
.repo{gap:8px;padding:18px 0}
.repo h3{font-size:14px}
.repo .description{font-size:12px}
.repo-stars{font-size:13px}
.repo-meta{gap:5px 12px;font-size:10px}
.pagination{gap:12px}
.pagination button{font-size:12px;padding:8px 10px}
}
