/* Tefily public git pages. Pebble: calm, light, rounded, one accent. Tokens mirror website/assets/styles.css. */

@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url("fonts/geist-400.woff") format("woff"); }
@font-face { font-family: "Geist"; font-weight: 500; font-display: swap; src: url("fonts/geist-500.woff") format("woff"); }
@font-face { font-family: "Geist"; font-weight: 600; font-display: swap; src: url("fonts/geist-600.woff") format("woff"); }
@font-face { font-family: "Geist Mono"; font-weight: 400; font-display: swap; src: url("fonts/geist-mono-400.woff") format("woff"); }

:root {
  --chrome: #e3e3e9;
  --paper: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f0f0f3;
  --surface-3: #e5e5ea;
  --ink: #1d1d1f;
  --ink-soft: #48484d;
  --ink-mute: #626267;
  --line: #e5e5ea;
  --line-strong: #c7c7cc;
  --control-line: #86868b;
  --accent: #3352f0;
  --accent-hover: #2640d4;
  --accent-ink: #3352f0;
  --accent-soft: #eaeeff;
  --on-accent: #ffffff;
  --ok: #0a7a64;
  --ok-soft: #e0f4ee;
  --warn: #9a5b00;
  --warn-soft: #fdf0dc;
  --bad: #c8202b;
  --bad-soft: #fde8e7;
  --add-bg: #e6f6ef;
  --add-ln: #cfeedd;
  --del-bg: #fdeceb;
  --del-ln: #f9d6d4;
  --hunk-bg: #f0f3ff;
  --target: #fff6d6;
  --header-bg: rgba(245, 245, 247, 0.8);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-pop: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  --radius: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1200px;
  --font-body: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Syntax colours. */
  --hl-keyword: #5856d6;
  --hl-string: #0a7a64;
  --hl-number: #9a5b00;
  --hl-comment: #8a8a90;
  --hl-title: #3352f0;
  --hl-type: #b25000;
  --hl-attr: #c2185b;
  --hl-builtin: #0a7f8a;
  --hl-meta: #6e6e73;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --chrome: #000000;
    --paper: #111113;
    --surface: #1c1c1e;
    --surface-2: #2c2c2f;
    --surface-3: #3a3a3d;
    --ink: #f5f5f7;
    --ink-soft: #c7c7cc;
    --ink-mute: #98989d;
    --line: #2e2e31;
    --line-strong: #48484c;
    --control-line: #7c7c82;
    --accent: #4a63ff;
    --accent-hover: #6278ff;
    --accent-ink: #97a8ff;
    --accent-soft: #1d2550;
    --ok: #3fd0ac;
    --ok-soft: #0f2f27;
    --warn: #ffb340;
    --warn-soft: #3a2a10;
    --bad: #ff6961;
    --bad-soft: #3b1715;
    --add-bg: #10291f;
    --add-ln: #153526;
    --del-bg: #301514;
    --del-ln: #3d1a18;
    --hunk-bg: #1a1f38;
    --target: #3a3214;
    --header-bg: rgba(17, 17, 19, 0.78);
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --hl-keyword: #a5a3ff;
    --hl-string: #6fdcb8;
    --hl-number: #ffc266;
    --hl-comment: #7c7c82;
    --hl-title: #97a8ff;
    --hl-type: #ffa565;
    --hl-attr: #ff8fb8;
    --hl-builtin: #5fd3dd;
    --hl-meta: #a1a1a6;
    color-scheme: dark;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; }
body {
  margin: 0;
  font: 400 15px/1.55 var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
code, pre, .mono { font-family: var(--font-mono); font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.muted { color: var(--ink-mute); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.page { padding-top: 24px; padding-bottom: 64px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* Icons */
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.i-sm { width: 14px; height: 14px; }
.i-folder { color: var(--accent); fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.i-done { display: none; color: var(--ok); }
.is-copied .i-done { display: inline-block; }
.is-copied .i:not(.i-done) { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid transparent;
  font: 500 14px/1 var(--font-body); color: var(--ink);
  background: transparent; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  border: 0; background: transparent; color: var(--ink-mute); cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }

/* Pills, dots, avatars */
.pill {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1;
}
.pill .i { width: 12px; height: 12px; vertical-align: 0; }
.pill-mute { background: var(--surface-2); color: var(--ink-soft); }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--ink-mute); }
.dot-ok { background: var(--ok); }
.dot-bad { background: var(--bad); }
.dot-run { background: var(--warn); }
.av {
  display: inline-grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 10px; font-weight: 600; letter-spacing: .02em; color: #fff;
}
.av-sm { width: 18px; height: 18px; font-size: 8px; }
.av-0 { background: #5856d6; } .av-1 { background: #0a8a8a; } .av-2 { background: #e2552a; } .av-3 { background: #8e44e0; }
.av-4 { background: #c27c00; } .av-5 { background: #e0386e; } .av-6 { background: #2f8f46; } .av-7 { background: #3352f0; }
.sha { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); background: var(--surface-2); padding: 2px 7px; border-radius: 6px; }
a.sha:hover { color: var(--accent-ink); text-decoration: none; }
.branch-chip { background: var(--accent-soft); color: var(--accent-ink); padding: 2px 8px; border-radius: 6px; font-size: 12.5px; }

/* Cards and lists */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); font-weight: 500;
}
.card-head a { color: var(--ink); }
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.section-title { font-size: 17px; font-weight: 600; margin: 4px 0 14px; }

/* Site header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header-row { display: flex; align-items: center; gap: 16px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.brand-sep { width: 1px; height: 18px; background: var(--line-strong); }
.brand-sub { color: var(--ink-soft); font-weight: 500; }
.site-search {
  margin-left: auto; position: relative; display: flex; align-items: center;
  width: min(340px, 40vw);
}
.site-search .i { position: absolute; left: 11px; color: var(--ink-mute); pointer-events: none; }
.site-search input {
  width: 100%; height: 34px; padding: 0 12px 0 34px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  font: inherit; font-size: 14px; color: var(--ink);
}
.site-search input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.site-footer { border-top: 1px solid var(--line); color: var(--ink-mute); font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 28px; }

/* Directory */
.hero { padding: 64px 0 36px; text-align: center; }
.eyebrow { color: var(--accent-ink); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; }
.lead { color: var(--ink-soft); font-size: 17px; max-width: 560px; margin: 14px auto 28px; }
.hero-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  max-width: 620px; margin: 0 auto; padding: 6px 6px 6px 44px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
}
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-search .i { position: absolute; left: 18px; width: 18px; height: 18px; color: var(--ink-mute); }
.hero-search input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }
.hero-search input:focus { outline: none; }
.hero-search .btn { height: 40px; padding: 0 20px; }
.repo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.repo-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.repo-card:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.repo-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.repo-card-owner { font-size: 13px; color: var(--ink-mute); }
.repo-card-name { font-size: 17px; font-weight: 600; color: var(--accent-ink); overflow-wrap: anywhere; }
.repo-card-desc { color: var(--ink-soft); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.repo-card-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 13px; color: var(--ink-mute); }
.repo-card-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* Empty and error states */
.empty { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 14px; }
.empty-icon .i { width: 22px; height: 22px; }
.empty h2 { font-size: 17px; font-weight: 600; }
.empty p { color: var(--ink-soft); margin: 6px auto 18px; max-width: 460px; }
.error-page { text-align: center; padding: 96px 24px; }
.error-code { font-size: 64px; font-weight: 600; letter-spacing: -0.04em; color: var(--accent-ink); opacity: .9; }
.error-page h1 { font-size: 26px; margin-top: 6px; }
.error-page p { color: var(--ink-soft); margin: 10px auto 26px; max-width: 480px; }

/* Repository header */
.repo-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.repo-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-top: 26px; flex-wrap: wrap; }
.repo-id { min-width: 0; flex: 1 1 380px; }
.repo-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.repo-project { color: var(--ink-soft); font-size: 22px; }
.repo-crumbs .slash { color: var(--line-strong); font-size: 22px; }
.repo-crumbs h1 { font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
.repo-crumbs h1 a { color: var(--ink); }
.repo-fork { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--ink-mute); font-size: 13px; }
.repo-desc { margin-top: 8px; color: var(--ink-soft); max-width: 720px; }
.repo-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.clone { display: flex; align-items: center; gap: 6px; padding: 4px; background: var(--surface-2); border-radius: 999px; }
.clone .seg { background: transparent; padding: 0; }
.clone-field { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 4px 0 12px; height: 30px; }
.clone-field input { width: 260px; border: 0; background: transparent; color: var(--ink-soft); font-size: 12.5px; text-overflow: ellipsis; }
.clone-field input:focus { outline: none; }

/* Segmented control */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 999px; }
.seg-item {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px;
  border: 0; background: transparent; color: var(--ink-soft); font: 500 13px/1 var(--font-body); cursor: pointer;
}
.seg-item:hover { color: var(--ink); text-decoration: none; }
.seg-item.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 12px 13px; color: var(--ink-soft); font-weight: 500; font-size: 14px; white-space: nowrap;
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-on { color: var(--ink); }
.tab.is-on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.count { background: var(--surface-2); color: var(--ink-soft); border-radius: 999px; font-size: 12px; padding: 1px 7px; }
.tabs-inline { margin: 22px 0 16px; border-bottom: 1px solid var(--line); }

/* Toolbar, ref picker, breadcrumb */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ref-picker { position: relative; }
.ref-picker summary { list-style: none; }
.ref-picker summary::-webkit-details-marker { display: none; }
.ref-label { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.menu {
  position: absolute; z-index: 15; top: calc(100% + 6px); left: 0; width: 300px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
  padding: 8px;
}
.menu input {
  width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-2); font: inherit; font-size: 13px; color: var(--ink);
}
.menu input:focus { outline: none; border-color: var(--accent); }
.menu-scroll { max-height: 320px; overflow: auto; margin-top: 6px; }
.menu-label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-mute); padding: 8px 8px 4px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--ink); font-size: 13.5px; }
.menu li a:hover { background: var(--surface-2); text-decoration: none; }
.menu li a.is-on { background: var(--accent-soft); color: var(--accent-ink); }
.ref-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 15px; min-width: 0; }
.crumbs a { font-weight: 500; }
.crumbs .slash { color: var(--line-strong); }
.crumb-current { font-weight: 600; overflow-wrap: anywhere; }

/* File list */
.files { overflow: hidden; }
.commit-strip {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 14px; min-width: 0;
}
.commit-strip-author { font-weight: 600; white-space: nowrap; }
.commit-strip-msg { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.commit-strip-meta { display: flex; align-items: center; gap: 12px; color: var(--ink-mute); white-space: nowrap; font-size: 13px; }
.commit-strip-count { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); }
.file-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.file-table tr + tr td { border-top: 1px solid var(--line); }
.file-table tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.file-table td { padding: 9px 16px; font-size: 14px; vertical-align: middle; }
.ft-name { width: 34%; }
.ft-name a { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); max-width: 100%; }
.ft-name a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-name .i:not(.i-folder) { color: var(--ink-mute); }
.ft-msg { color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-msg a { color: var(--ink-mute); }
.ft-msg a:hover { color: var(--accent-ink); }
.ft-time { width: 140px; text-align: right; color: var(--ink-mute); white-space: nowrap; font-size: 13px; }

/* README and markdown */
.readme { margin-top: 18px; overflow: hidden; }
.markdown { padding: 24px 32px 28px; font-size: 15.5px; line-height: 1.7; overflow-wrap: break-word; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { margin: 1.6em 0 .6em; line-height: 1.25; font-weight: 600; }
.markdown h1 { font-size: 1.85em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.markdown h2 { font-size: 1.4em; padding-bottom: .25em; border-bottom: 1px solid var(--line); }
.markdown h3 { font-size: 1.15em; }
.markdown p, .markdown ul, .markdown ol, .markdown blockquote, .markdown pre, .markdown table, .markdown details { margin: 0 0 1em; }
.markdown ul, .markdown ol { padding-left: 1.6em; }
.markdown li + li { margin-top: .25em; }
.markdown li > input[type="checkbox"] { margin: 0 .4em 0 -1.3em; vertical-align: -1px; }
.markdown blockquote { padding: 2px 16px; border-left: 3px solid var(--line-strong); color: var(--ink-soft); }
.markdown code { background: var(--surface-2); padding: .15em .4em; border-radius: 6px; font-size: .86em; }
.markdown pre { background: var(--surface-2); padding: 14px 16px; border-radius: var(--radius-sm); overflow: auto; line-height: 1.5; }
.markdown pre code { background: none; padding: 0; font-size: 13px; }
.markdown table { border-collapse: collapse; display: block; overflow: auto; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 6px 13px; }
.markdown th { background: var(--surface-2); font-weight: 600; }
.markdown td code, .markdown th code { white-space: nowrap; }
.markdown img { max-width: 100%; height: auto; border-radius: 6px; }
.markdown hr { border: 0; height: 1px; background: var(--line); margin: 1.6em 0; }
.markdown kbd { font-family: var(--font-mono); font-size: 12px; padding: 2px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); }
.md-ext-img { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); }
.plain { margin: 0; padding: 20px; white-space: pre-wrap; }

/* File view */
.blob { overflow: hidden; }
.blob-head { justify-content: space-between; flex-wrap: wrap; position: sticky; top: 58px; z-index: 5; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; }
.blob-info { display: flex; align-items: center; gap: 12px; font-weight: 400; font-size: 13px; }
.blob-actions { display: flex; align-items: center; gap: 2px; }
.blob-image { display: grid; place-items: center; padding: 32px; background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 20px 20px; }
.blob-image img { max-width: 100%; height: auto; box-shadow: var(--shadow); }
.blob-note { display: grid; justify-items: center; gap: 12px; padding: 48px; color: var(--ink-soft); }
.blob-note > .i { width: 28px; height: 28px; color: var(--ink-mute); }
.code-scroll, .diff-scroll { overflow-x: auto; }
table.code, table.diff { border-collapse: collapse; width: 100%; font-family: var(--font-mono); font-size: 13px; line-height: 20px; tab-size: 4; }
table.code td, table.diff td { padding: 0; vertical-align: top; }
.ln { width: 1%; min-width: 52px; padding: 0 12px 0 16px !important; text-align: right; color: var(--ink-mute); user-select: none; -webkit-user-select: none; white-space: nowrap; }
.ln a, .ln[data-n] { color: inherit; }
.ln a::before, td.ln[data-n]::before { content: attr(data-n); }
.ln a:hover { color: var(--ink); text-decoration: none; }
.lc { padding: 0 16px 0 8px !important; white-space: pre; color: var(--ink); }
table.code tr:first-child td { padding-top: 10px !important; }
table.code tr:last-child td { padding-bottom: 12px !important; }
table.code tr:target td, table.code tr.is-target td { background: var(--target); }
table.code tr:target .ln, table.code tr.is-target .ln { color: var(--ink); }

/* Diffs */
.diff-summary { display: flex; align-items: center; gap: 12px; font-weight: 500; margin: 20px 0 10px; }
.add { color: var(--ok); font-family: var(--font-mono); font-size: 13px; }
.del { color: var(--bad); font-family: var(--font-mono); font-size: 13px; }
.diff-files { margin-bottom: 16px; }
.diff-files ul { list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); max-height: 220px; overflow: auto; }
.diff-files a { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 8px; color: var(--ink-soft); font-size: 13px; }
.diff-files a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.diff-file-name { flex: 1; font-family: var(--font-mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diff-file { margin-bottom: 14px; overflow: hidden; scroll-margin-top: 72px; }
.diff-file-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); cursor: pointer; list-style: none; }
.diff-file[open] .diff-file-head { border-bottom: 1px solid var(--line); }
.diff-file-head::-webkit-details-marker, .run-head::-webkit-details-marker, .step summary::-webkit-details-marker { display: none; }
.i-turn { transition: transform .15s ease; color: var(--ink-mute); }
details[open] > summary .i-turn { transform: rotate(90deg); }
.diff-file-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.diff-file-stats { margin-left: auto; display: flex; gap: 8px; }
.diff-note { padding: 18px 16px; color: var(--ink-mute); font-size: 14px; }
table.diff tr.add td { background: var(--add-bg); }
table.diff tr.add td.ln { background: var(--add-ln); }
table.diff tr.del td { background: var(--del-bg); }
table.diff tr.del td.ln { background: var(--del-ln); }
table.diff tr.hunk td { background: var(--hunk-bg); color: var(--ink-mute); padding-top: 4px !important; padding-bottom: 4px !important; }
table.diff tr.note td { color: var(--ink-mute); font-style: italic; }
table.diff td.ln { min-width: 44px; padding: 0 8px 0 10px !important; }
.sign { display: inline-block; width: 1.2em; color: var(--ink-mute); user-select: none; -webkit-user-select: none; }
tr.add .sign { color: var(--ok); }
tr.del .sign { color: var(--bad); }

/* Commits */
.day { margin-bottom: 22px; }
.day-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-mute); margin: 0 0 8px 4px; }
.commit-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.commit-row:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.commit-main { min-width: 0; flex: 1; }
.commit-title { display: block; color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commit-sub { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
.commit-side { display: flex; align-items: center; gap: 4px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.commit-head { padding: 20px 22px; }
.commit-head-title { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.commit-head-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.commit-head-sha { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.commit-head-sha code { font-size: 12px; color: var(--ink-soft); }

/* Branches and tags */
.ref-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.ref-row-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; }
.ref-row-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-row-side { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Merge requests */
.mr-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; }
.mr-row-icon { margin-top: 2px; color: var(--ink-mute); }
.mr-open { color: var(--ok); }
.mr-merged { color: #8e44e0; }
.mr-closed { color: var(--bad); }
.mr-row-main { flex: 1; min-width: 0; }
.mr-row-title { color: var(--ink); font-weight: 600; margin-right: 6px; }
.mr-row-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; }
.mr-head { padding-top: 4px; }
.mr-title { font-size: 24px; font-weight: 600; overflow-wrap: anywhere; }
.mr-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: var(--ink-soft); font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline-item { position: relative; display: flex; gap: 14px; margin-bottom: 18px; }
.timeline-item > .av { width: 32px; height: 32px; font-size: 12px; box-shadow: 0 0 0 4px var(--paper); }
.comment { flex: 1; min-width: 0; overflow: hidden; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 14px; }
.comment-body { padding: 14px 18px; font-size: 15px; }
.timeline-event { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 0 18px 6px; padding-left: 4px; color: #8e44e0; font-weight: 500; }
.timeline-event .i { background: var(--paper); }

/* CI */
.run { margin-bottom: 12px; overflow: hidden; }
.run-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.run[open] .run-head { border-bottom: 1px solid var(--line); }
.run-time { margin-left: auto; font-size: 13px; }
.steps { padding: 6px; }
.step { border-radius: var(--radius-sm); }
.step summary { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; list-style: none; font-size: 14px; }
.step summary:hover { background: var(--surface-2); }
.step-name { font-weight: 500; }
.log { margin: 4px 6px 10px; padding: 14px 16px; max-height: 480px; overflow: auto; background: #111113; color: #e5e5ea; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.log .muted { color: #8a8a90; }

/* Syntax highlighting (highlight.js class names) */
.hljs-keyword, .hljs-selector-tag, .hljs-doctag, .hljs-template-tag { color: var(--hl-keyword); }
.hljs-string, .hljs-regexp, .hljs-template-variable, .hljs-addition, .hljs-meta .hljs-string { color: var(--hl-string); }
.hljs-number, .hljs-literal, .hljs-symbol, .hljs-bullet, .hljs-link { color: var(--hl-number); }
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }
.hljs-title, .hljs-section, .hljs-selector-id, .hljs-title.function_ { color: var(--hl-title); }
.hljs-type, .hljs-title.class_, .hljs-class .hljs-title, .hljs-selector-class { color: var(--hl-type); }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-variable, .hljs-name, .hljs-selector-attr, .hljs-selector-pseudo { color: var(--hl-attr); }
.hljs-built_in, .hljs-params .hljs-built_in, .hljs-variable.language_ { color: var(--hl-builtin); }
.hljs-meta, .hljs-meta .hljs-keyword, .hljs-tag { color: var(--hl-meta); }
.hljs-deletion { color: var(--bad); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 600; }

/* Small screens */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .site-header-row { gap: 10px; }
  .brand-sep, .brand-sub { display: none; }
  .site-search { width: auto; flex: 1; }
  .site-header .btn-ghost { display: none; }
  .hero { padding: 40px 0 24px; }
  .repo-grid { grid-template-columns: 1fr; }
  .repo-head-row { padding-top: 18px; gap: 14px; }
  .repo-project, .repo-crumbs .slash, .repo-crumbs h1 { font-size: 19px; }
  .repo-actions, .clone { width: 100%; }
  .clone-field { flex: 1; min-width: 0; }
  .clone-field input { width: 100%; min-width: 0; }
  .ft-msg { display: none; }
  .ft-name { width: auto; }
  .ft-time { width: 104px; }
  .commit-strip { flex-wrap: wrap; }
  .commit-strip-msg { flex-basis: 100%; order: 3; }
  .commit-strip-meta { margin-left: auto; }
  .markdown { padding: 18px 18px 22px; }
  .commit-side .icon-btn { display: none; }
  .commit-head-sha { margin-left: 0; }
  .blob-head { top: 0; position: static; }
  .timeline-item > .av { display: none; }
  .timeline::before { display: none; }
  .run-time { margin-left: 0; }
}
