@font-face {
    font-family: 'IosevkaNerdFontMono';
    src: url('/fonts/IosevkaNerdFontMono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'IosevkaNerdFontMono';
    src: url('/fonts/IosevkaNerdFontMono-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'IosevkaNerdFontMono';
    src: url('/fonts/IosevkaNerdFontMono-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

:root {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --fg: #c9d1d9;
    --fg-muted: #8b949e;
    --fg-subtle: #6e7681;
    --border: #30363d;
    --link: #58a6ff;
    --link-hover: #79c0ff;
    --green: #3fb950;
    --red: #f85149;
    --yellow: #d29922;
}

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

html {
    font-size: 14px;
}

body {
    font-family: 'IosevkaNerdFontMono', ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
    min-height: 100vh;
}

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

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

header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0.5rem;
}

header nav {
    max-width: 1200px;
    margin: 0 auto;
}

header .logo {
    font-weight: bold;
    font-size: 1.1rem;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 0.5rem;
}

footer {
    border-top: 1px solid var(--border);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--fg-subtle);
    margin-top: 4rem;
}

h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; color: var(--fg-muted); }
h3 { font-size: 1.1rem; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    text-align: left;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-secondary);
    color: var(--fg-muted);
    font-weight: 600;
}

tr:hover {
    background: var(--bg-secondary);
}

code, pre {
    font-family: inherit;
    background: var(--bg-secondary);
    border-radius: 4px;
}

pre {
    padding: 1rem;
    overflow-x: auto;
}

code {
    padding: 0.2rem 0.4rem;
}

.repo-header {
    margin-bottom: 1.5rem;
}

.repo-header h1 {
    margin-bottom: 0.25rem;
}

.repo-header .description {
    color: var(--fg-muted);
}

.repo-nav {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.repo-nav a {
    color: var(--fg-muted);
}

.repo-nav a:hover {
    color: var(--fg);
}

.clone-urls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.clone-urls code {
    background: var(--bg-tertiary);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.tree .mode {
    width: 80px;
    color: var(--fg-subtle);
    font-size: 0.85rem;
}

.tree .name {
    font-weight: 500;
}

.commits .hash {
    width: 80px;
}

.commits .hash a {
    font-family: inherit;
}

.commits .subject {
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.commits .author {
    color: var(--fg-muted);
    width: 150px;
}

.commits .date {
    color: var(--fg-subtle);
    width: 150px;
    text-align: right;
    white-space: nowrap;
}

.summary-section {
    margin-bottom: 3rem;
}

.summary-section h2 {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.breadcrumb {
    margin-bottom: 1rem;
    color: var(--fg-muted);
}

.blob-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: var(--fg-muted);
    font-size: 0.9rem;
}

.blob-content {
    border: 1px solid var(--border);
    border-radius: 0 0 4px 4px;
    overflow-x: auto;
}

.blob-content table.code {
    margin: 0;
}

.blob-content table.code td {
    border: none;
    padding: 0;
    vertical-align: top;
}

.blob-content .line-num {
    width: 1%;
    min-width: 50px;
    padding: 0 1rem;
    text-align: right;
    user-select: none;
    background: var(--bg-secondary);
    color: var(--fg-subtle);
    border-right: 1px solid var(--border);
}

.blob-content .line-num a {
    color: inherit;
}

.blob-content .line-num a:hover {
    color: var(--link);
    text-decoration: none;
}

.blob-content .line-code {
    white-space: pre;
}

.blob-content .line-code pre {
    margin: 0;
    padding: 0 0 0 1rem;
    background: none;
    border-radius: 0;
}

.blob-content .line-code code {
    padding: 0;
    background: none;
}

.blob-content tr:hover {
    background: var(--bg-tertiary);
}

.blob-content tr:target {
    background: rgba(88, 166, 255, 0.15);
}

.binary-notice {
    padding: 2rem;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--fg-muted);
}

.commit-detail {
    margin-bottom: 2rem;
}

.commit-detail h2 {
    color: var(--fg);
    border: none;
    padding: 0;
}

.commit-meta {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0.5rem 1rem;
    margin: 1rem 0;
    color: var(--fg-muted);
}

.commit-meta dt {
    font-weight: 600;
}

.commit-meta dd code {
    font-size: 0.9rem;
}

.commit-body {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 4px;
    white-space: pre-wrap;
    color: var(--fg-muted);
}

.diff-container {
    margin-top: 2rem;
}

.diff {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.refs-section {
    margin-bottom: 2rem;
}

.refs-list {
    list-style: none;
}

.refs-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.refs-list .ref-link {
    color: var(--fg-subtle);
    font-size: 0.85rem;
}

.readme {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
}

.readme pre {
    background: none;
    padding: 0;
    margin: 0;
    white-space: pre-wrap;
}

.markdown-body {
    line-height: 1.7;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--fg);
}

.markdown-body h1 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
.markdown-body h2 { font-size: 1.3rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
.markdown-body h3 { font-size: 1.1rem; }

.markdown-body p {
    margin: 1em 0;
}

.markdown-body ul,
.markdown-body ol {
    margin: 1em 0;
    padding-left: 2em;
}

.markdown-body li {
    margin: 0.25em 0;
}

.markdown-body code {
    background: var(--bg-tertiary);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

.markdown-body pre {
    background: var(--bg-tertiary);
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1em 0;
}

.markdown-body pre code {
    background: none;
    padding: 0;
}

.markdown-body blockquote {
    border-left: 3px solid var(--border);
    margin: 1em 0;
    padding-left: 1em;
    color: var(--fg-muted);
}

.markdown-body table {
    margin: 1em 0;
}

.markdown-body img {
    max-width: 100%;
}

.markdown-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

.error {
    text-align: center;
    padding: 4rem 2rem;
}

.error h1 {
    color: var(--red);
}

.hljs {
    background: transparent !important;
}
