/* codehost: GitHub's dark look (Primer colours, system fonts, Octicons) for OScope's own code host */
:root {
  --bg: #0d1117; --bg-inset: #010409; --bg-muted: #151b23; --bg-hover: #262c36; --bg-neutral: #656c7633;
  --border: #3d444d; --border-muted: #3d444db3;
  --fg: #f0f6fc; --fg-muted: #9198a1; --accent: #4493f8;
  --btn: #212830; --btn-hover: #262c36;
  --green: #238636; --green-hover: #29903b; --green-fg: #3fb950;
  --tab: #f78166; --sel: #bb800926; --accent-muted: #388bfd1a;
  --add-bg: #2ea04326; --add-num: #3fb9504d; --del-bg: #f851491a; --del-num: #f851494d;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
svg[data-component="Octicon"], .octicon { fill: currentColor; vertical-align: text-bottom; flex: none; overflow: visible; }
.mono { font-family: var(--mono); }
.grow { flex: 1; }
.muted { color: var(--fg-muted); }
button { font: inherit; color: inherit; }
kbd { display: inline-block; min-width: 18px; padding: 0 4px; font: 11px/16px var(--mono); text-align: center; color: var(--fg-muted);
  border: 1px solid var(--border); border-radius: 4px; background: var(--bg-muted); }

/* ── header ── */
.hd { background: var(--bg-inset); border-bottom: 1px solid var(--border); }
.hd-top { display: flex; align-items: center; gap: 12px; height: 56px; padding: 12px 16px 0; }
.hd-logo img { display: block; width: 32px; height: 32px; border-radius: 6px; }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; font-size: 14px; }
.crumbs a { padding: 3px 6px; border-radius: 6px; color: var(--fg); white-space: nowrap; }
.crumbs a:hover { background: var(--bg-hover); text-decoration: none; }
.crumbs .sep { color: var(--fg-muted); }
.crumbs b { font-weight: 600; }
.hd-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search { display: flex; align-items: center; gap: 8px; width: 280px; height: 32px; padding: 0 8px; color: var(--fg-muted); text-align: left;
  background: transparent; border: 1px solid var(--border); border-radius: 6px; cursor: text; }
.search:hover { border-color: #656c76; }
.search span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; color: var(--fg-muted);
  background: transparent; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.iconbtn:hover { color: var(--fg); background: var(--bg-hover); text-decoration: none; }
/* the way back to the terminal (owner 10-22: "let me navigate more easily back to the memescope from there") */
.btn.back { gap: 8px; height: 32px; color: var(--fg); font-weight: 600; background: #1f6feb26; border-color: #1f6feb99; }
.btn.back:hover { background: #1f6feb40; border-color: var(--accent); }
.btn.back .octicon { color: var(--accent); }
.btn.back img { width: 18px; height: 18px; border-radius: 4px; }
.tabs { display: flex; align-items: flex-end; gap: 8px; height: 48px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; display: flex; align-items: center; gap: 8px; height: 32px; margin-bottom: 8px; padding: 0 8px; color: var(--fg);
  border-radius: 6px; white-space: nowrap; }
.tab .octicon { color: var(--fg-muted); }
.tab:hover { background: var(--bg-hover); text-decoration: none; }
.tab.on { font-weight: 600; }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 2px; border-radius: 6px; background: var(--tab); }
.count { display: inline-block; min-width: 20px; padding: 0 6px; font-size: 12px; font-weight: 500; line-height: 18px; text-align: center;
  color: var(--fg); background: var(--bg-neutral); border-radius: 2em; }

/* ── buttons, labels ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; font-size: 14px; font-weight: 500;
  line-height: 20px; color: var(--fg); white-space: nowrap; background: var(--btn); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn .octicon { color: var(--fg-muted); }
.btn.sm { height: 28px; padding: 0 8px; font-size: 12px; }
.btn.icon { width: 32px; padding: 0; }
.btn.sm.icon { width: 28px; }
.btn.primary { color: #fff; background: var(--green); border-color: #f0f6fc1a; }
.btn.primary:hover { background: var(--green-hover); }
.btn.primary .octicon { color: #fff; }
.btn.flat { background: transparent; border-color: transparent; color: var(--fg-muted); }
.btn.flat:hover { background: var(--bg-hover); color: var(--fg); }
.btngroup { display: inline-flex; }
.btngroup > .btn { border-radius: 0; margin-left: -1px; }
.btngroup > .btn:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.btngroup > .btn:last-child { border-radius: 0 6px 6px 0; }
.lbl { display: inline-block; padding: 0 7px; font-size: 12px; font-weight: 500; line-height: 18px; color: var(--fg-muted); white-space: nowrap;
  border: 1px solid var(--border); border-radius: 2em; }
.lbl.green { color: var(--green-fg); border-color: var(--green); }
[data-copy], [data-copy-url], [data-copy-pre] { position: relative; }
.i-done { display: none; color: var(--green-fg); }
.done .i-copy { display: none; }
.done .i-done { display: inline-block; }

/* ── page frame ── */
.wrap { max-width: 1280px; margin: 0 auto; padding: 24px 32px; }
.wrap.narrow { max-width: 1012px; }
.repohead { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.repohead img { width: 24px; height: 24px; border-radius: 6px; }
.repohead h1 { margin: 0; font-size: 20px; font-weight: 600; line-height: 30px; }
.repohead h1 a { color: var(--fg); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 24px; }
.bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.bar .meta-link { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; height: 32px; color: var(--fg-muted); border-radius: 6px; }
.bar .meta-link b { color: var(--fg); }
.bar a.meta-link:hover { background: var(--bg-hover); text-decoration: none; color: var(--accent); }
.gotofile { display: flex; align-items: center; gap: 8px; width: 240px; height: 32px; padding: 0 8px; color: var(--fg-muted);
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; cursor: text; text-align: left; }
.gotofile:hover { border-color: #656c76; }
.gotofile kbd { margin-left: auto; }

/* ── boxes, file table ── */
.box { border: 1px solid var(--border); border-radius: 6px; background: var(--bg); }
.box + .box { margin-top: 16px; }
.box-head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 12px 16px; background: var(--bg-muted);
  border-bottom: 1px solid var(--border); border-radius: 6px 6px 0 0; }
.box-head:last-child { border-bottom: 0; border-radius: 6px; }
.av { display: block; width: 24px; height: 24px; border-radius: 6px; flex: none; }
.av.sm { width: 16px; height: 16px; border-radius: 4px; }
.commit .who { color: var(--fg); font-weight: 600; white-space: nowrap; }
.commit .msg { min-width: 0; overflow: hidden; color: var(--fg-muted); white-space: nowrap; text-overflow: ellipsis; }
.commit .msg:hover { color: var(--accent); }
.commit .sha { color: var(--fg-muted); font-size: 12px; }
.commit .when { color: var(--fg-muted); font-size: 12px; white-space: nowrap; }
.commit .hist { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 0 8px; height: 28px; color: var(--fg);
  font-size: 12px; white-space: nowrap; border-radius: 6px; }
.commit .hist:hover { background: var(--bg-hover); text-decoration: none; }
.commit .hist .octicon { color: var(--fg-muted); }
table.files { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.files td { height: 40px; padding: 0 16px; border-top: 1px solid var(--border-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.files tr:first-child td { border-top: 0; }
table.files tr:hover td { background: var(--bg-muted); }
table.files tr:last-child td:first-child { border-radius: 0 0 0 6px; }
table.files tr:last-child td:last-child { border-radius: 0 0 6px 0; }
.files .ic { width: 44px; padding-right: 0; color: var(--fg-muted); }
.ic-dir { color: var(--fg-muted); }
.files .nm { width: 32%; }
.files .nm a { color: var(--fg); }
.files .nm a:hover { color: var(--accent); text-decoration: underline; }
.files .cm a { color: var(--fg-muted); }
.files .cm a:hover { color: var(--accent); }
.files .age { width: 140px; color: var(--fg-muted); text-align: right; }

/* ── readme ── */
.readme { margin-top: 16px; }
.readme-tabs { display: flex; align-items: flex-end; gap: 8px; height: 48px; padding: 0 8px; border-bottom: 1px solid var(--border); }
.readme-tabs .tab { background: none; border: 0; cursor: pointer; font-size: 14px; }
.readme-tabs .tab:hover { background: var(--bg-hover); }

/* ── markdown ── */
.md { padding: 32px; font-size: 16px; line-height: 1.5; word-wrap: break-word; }
.md > *:first-child { margin-top: 0 !important; }
.md > *:last-child { margin-bottom: 0 !important; }
.md h1, .md h2, .md h3, .md h4, .md h5 { position: relative; margin: 24px 0 16px; font-weight: 600; line-height: 1.25; }
.md h1 { padding-bottom: .3em; font-size: 2em; border-bottom: 1px solid var(--border-muted); }
.md h2 { padding-bottom: .3em; font-size: 1.5em; border-bottom: 1px solid var(--border-muted); }
.md h3 { font-size: 1.25em; }
.md h4 { font-size: 1em; }
.md .anchor { position: absolute; left: -24px; top: 50%; transform: translateY(-50%); padding-right: 6px; color: var(--fg); opacity: 0; line-height: 1; }
.md h1:hover .anchor, .md h2:hover .anchor, .md h3:hover .anchor, .md h4:hover .anchor { opacity: 1; }
.md h1 .anchor, .md h2 .anchor { top: calc(50% - .15em); }
.md p, .md ul, .md ol, .md table, .md blockquote, .md details, .md .codewrap { margin: 0 0 16px; }
.md ul, .md ol { padding-left: 2em; }
.md li + li { margin-top: .25em; }
.md code { padding: .2em .4em; font: 85% var(--mono); white-space: break-spaces; background: var(--bg-neutral); border-radius: 6px; }
.md pre { margin: 0; padding: 16px; overflow: auto; font: 85%/1.45 var(--mono); background: var(--bg-muted); border-radius: 6px; }
.md pre code { padding: 0; font-size: 100%; white-space: pre; background: transparent; }
.md .codewrap { position: relative; }
.md .codewrap .btn { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .1s; }
.md .codewrap:hover .btn, .md .codewrap .btn:focus, .md .codewrap .btn.done { opacity: 1; }
.md table { display: block; width: max-content; max-width: 100%; overflow: auto; border-collapse: collapse; border-spacing: 0; }
.md th, .md td { padding: 6px 13px; border: 1px solid var(--border); }
.md th { font-weight: 600; }
.md tr { background: var(--bg); border-top: 1px solid var(--border-muted); }
.md tr:nth-child(2n) { background: var(--bg-muted); }
.md img { max-width: 100%; box-sizing: content-box; }
.md hr { height: .25em; margin: 24px 0; padding: 0; background: var(--border); border: 0; }
.md blockquote { padding: 0 1em; color: var(--fg-muted); border-left: .25em solid var(--border); }
.md summary { cursor: pointer; }
.md .plain { margin: 0; font: inherit; white-space: pre-wrap; }
.md [align="center"] { text-align: center; }

/* ── sidebar ── */
.side section { padding: 24px 0; border-top: 1px solid var(--border-muted); }
.side section:first-child { padding-top: 0; border-top: 0; }
.side h2 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.side h2 a { color: var(--fg); }
.side h2 a:hover { color: var(--accent); text-decoration: none; }
.side .desc { margin: 0 0 16px; font-size: 16px; }
.side .home { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-weight: 600; }
.side .home .octicon { color: var(--fg-muted); }
.topics { display: flex; flex-wrap: wrap; gap: 6px 4px; margin-bottom: 16px; }
.topic { padding: 0 10px; font-size: 12px; font-weight: 500; line-height: 22px; color: var(--accent); background: var(--accent-muted); border-radius: 2em; }
.side .links a { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--fg-muted); }
.side .links a:hover { color: var(--accent); text-decoration: none; }
.side .rel { display: flex; gap: 8px; color: var(--fg); }
.side .rel:hover { text-decoration: none; }
.side .rel:hover b { color: var(--accent); }
.side .rel .octicon { margin-top: 3px; color: var(--green-fg); }
.side .rel small { color: var(--fg-muted); font-size: 12px; }
.langbar { display: flex; gap: 2px; height: 8px; margin-bottom: 8px; overflow: hidden; border-radius: 6px; }
.langs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.langs b { color: var(--fg); font-weight: 600; margin-right: 4px; }
.langs span { color: var(--fg-muted); }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; vertical-align: middle; }

/* ── code dropdown ── */
.dd { position: relative; }
.dd-panel { position: absolute; z-index: 30; right: 0; top: calc(100% + 4px); display: none; width: 400px; padding: 8px 0;
  background: var(--bg-muted); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px #010409b3; }
.dd.open .dd-panel { display: block; }
.dd-sec { padding: 8px 16px; }
.dd-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.dd-sec h3 .octicon { color: var(--fg-muted); }
.dd-sec p { margin: 8px 0 0; font-size: 12px; color: var(--fg-muted); }
.urlrow { display: flex; gap: 4px; }
.urlrow input { flex: 1; min-width: 0; height: 32px; padding: 0 8px; font: 12px var(--mono); color: var(--fg); background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; }
.dd-item { display: flex; align-items: center; gap: 8px; padding: 6px 16px; color: var(--fg); font-weight: 500; }
.dd-item .octicon { color: var(--fg-muted); }
.dd-item:hover { background: var(--bg-hover); text-decoration: none; }
.dd-item small { margin-left: auto; color: var(--fg-muted); font-weight: 400; }
.dd hr { margin: 8px 0; border: 0; border-top: 1px solid var(--border); }
.subtabs { display: flex; gap: 4px; padding: 0 16px 8px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.subtabs b { position: relative; padding: 4px 8px; font-size: 14px; }
.subtabs b::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: -9px; height: 2px; border-radius: 6px; background: var(--tab); }

/* ── tree + file view ── */
.split { display: flex; align-items: flex-start; }
.tree-panel { position: sticky; top: 0; flex: none; width: 320px; max-height: 100vh; padding: 16px 8px; overflow: auto; border-right: 1px solid var(--border);
  align-self: stretch; min-height: calc(100vh - 106px); }
.tp-head { display: flex; align-items: center; gap: 8px; padding: 0 8px 12px; }
.tp-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.tree ul { margin: 0; padding: 0; list-style: none; }
.tree ul ul { margin-left: 15px; padding-left: 8px; border-left: 1px solid transparent; }
.tree:hover ul ul { border-left-color: var(--border-muted); }
.tree .row { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; height: 32px; padding: 0 8px; color: var(--fg);
  font-size: 14px; border-radius: 6px; white-space: nowrap; }
.tree .row:hover { background: var(--bg-hover); text-decoration: none; }
.tree .row a { flex: 1; min-width: 0; overflow: hidden; color: var(--fg); text-overflow: ellipsis; }
.tree .row a:hover { text-decoration: none; }
.tree .row span { overflow: hidden; text-overflow: ellipsis; }
.tree .row .octicon { color: var(--fg-muted); }
.tree .row.cur { background: var(--bg-neutral); }
.tree .row.cur::before { content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 4px; border-radius: 6px; background: var(--accent); }
.tree .caret { display: inline-flex; padding: 0; margin-left: -4px; color: var(--fg-muted); background: none; border: 0; cursor: pointer; }
.tree li.closed > ul { display: none; }
.tree li.closed > .row .caret { transform: rotate(-90deg); }
.tree li .i-open { display: none; }
.tree li:not(.closed) > .row .i-open { display: inline-block; }
.tree li:not(.closed) > .row .i-shut { display: none; }
.filemain { flex: 1; min-width: 0; padding: 16px 24px 24px; }
.pathbar { display: flex; align-items: center; gap: 4px; min-height: 32px; margin-bottom: 16px; font-size: 16px; }
.pathbar a { font-weight: 600; }
.pathbar .sep { color: var(--fg-muted); padding: 0 2px; }
.pathbar b { font-weight: 600; }
.filebox { margin-top: 16px; border: 1px solid var(--border); border-radius: 6px; }
.filehead { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px; background: var(--bg-muted); border-bottom: 1px solid var(--border);
  border-radius: 6px 6px 0 0; }
.seg { display: inline-flex; padding: 0; overflow: hidden; background: var(--btn); border: 1px solid var(--border); border-radius: 6px; }
.seg > * { height: 28px; padding: 0 12px; font-size: 14px; font-weight: 500; line-height: 26px; color: var(--fg-muted); background: transparent; border: 0;
  cursor: pointer; }
.seg > .on { color: var(--fg); background: var(--bg); box-shadow: 0 0 0 1px var(--border); border-radius: 6px; }
.fileinfo { color: var(--fg-muted); font-size: 12px; white-space: nowrap; }
.code { overflow: auto; padding: 8px 0; }
table.code-t { width: 100%; border-collapse: collapse; font: 12px/20px var(--mono); tab-size: 8; }
.code-t td { padding: 0 10px; vertical-align: top; }
.code-t .ln { width: 1%; min-width: 50px; padding: 0 12px 0 16px; color: var(--fg-muted); text-align: right; white-space: nowrap; cursor: pointer; user-select: none; }
.code-t .ln::before { content: attr(data-l); }
.code-t .ln:hover { color: var(--fg); }
.code-t .lc { padding-left: 12px; color: var(--fg); white-space: pre; }
.code-t tr.sel td { background: var(--sel); }
.code-t tr.sel .ln { color: var(--fg); }
.img-view { display: flex; justify-content: center; padding: 24px; background: repeating-conic-gradient(#151b23 0% 25%, #0d1117 0% 50%) 50% / 16px 16px; }
.img-view img { max-width: 100%; height: auto; }
.empty { padding: 32px; text-align: center; color: var(--fg-muted); }

/* ── pages: head, commits, diff, releases, ai ── */
.pagehead { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border-muted); }
.pagehead h1 { margin: 0; font-size: 24px; font-weight: 400; }
.day { display: flex; align-items: center; gap: 8px; margin: 24px 0 8px; font-size: 14px; font-weight: 400; color: var(--fg-muted); }
.day:first-of-type { margin-top: 0; }
.crow { display: flex; align-items: center; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--border-muted); }
.crow:first-child { border-top: 0; }
.crow .msg { font-weight: 600; color: var(--fg); font-size: 16px; }
.crow .msg:hover { color: var(--accent); }
.crow .meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--fg-muted); }
.crow .meta b { color: var(--fg); }
.crow .right { margin-left: auto; display: flex; gap: 8px; }
.chead .ttl { margin: 0; font-size: 20px; font-weight: 600; }
.chead pre { margin: 8px 0 0; font: 13px/1.5 var(--mono); white-space: pre-wrap; color: var(--fg-muted); }
.cmeta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 12px 16px; font-size: 12px; color: var(--fg-muted); }
.cmeta b { color: var(--fg); }
.cmeta .grow { min-width: 8px; }
.cstat { margin: 24px 0 16px; color: var(--fg-muted); }
.cstat b { color: var(--fg); }
.adds { color: var(--green-fg); font-weight: 600; }
.dels { color: #f85149; font-weight: 600; }
.diffhead { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bg-muted); border-bottom: 1px solid var(--border);
  border-radius: 6px 6px 0 0; font: 12px var(--mono); }
.diffhead a.path { color: var(--fg); font-weight: 600; }
.diffhead:last-child { border-bottom: 0; border-radius: 6px; }
table.diff { width: 100%; border-collapse: collapse; font: 12px/20px var(--mono); }
.diff td { padding: 0 10px; vertical-align: top; }
.diff .n { width: 1%; min-width: 50px; color: var(--fg-muted); text-align: right; user-select: none; }
.diff .t { white-space: pre-wrap; word-break: break-all; }
.diff tr.add td { background: var(--add-bg); }
.diff tr.add .n { background: var(--add-num); color: var(--fg); }
.diff tr.del td { background: var(--del-bg); }
.diff tr.del .n { background: var(--del-num); color: var(--fg); }
.diff tr.hunk td { color: var(--fg-muted); background: var(--accent-muted); padding: 4px 10px; }
.relrow { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; margin-bottom: 32px; }
.relside { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; color: var(--fg-muted); font-size: 14px; }
.relside a { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-muted); }
.relside .when { color: var(--fg-muted); }
.relbody { padding: 16px 24px 24px; }
.reltitle { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.reltitle h2 { margin: 0; font-size: 32px; font-weight: 600; line-height: 1.25; }
.reltitle h2 a { color: var(--fg); }
.relbody .md { padding: 8px 0 16px; }
.relbody video { display: block; width: 100%; max-width: 880px; margin: 0 0 24px; border-radius: 6px; border: 1px solid var(--border); background: #000; }
.assets h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 20px; font-weight: 600; }
.assets ul { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 6px; }
.assets li { display: grid; grid-template-columns: minmax(0, 1fr) auto 90px 120px; align-items: center; gap: 16px; padding: 8px 16px;
  border-top: 1px solid var(--border-muted); font-size: 14px; }
.assets li:first-child { border-top: 0; }
.assets li a { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.assets li a .octicon { color: var(--fg-muted); }
.assets .dig { font: 12px var(--mono); color: var(--fg-muted); }
.assets .sz, .assets .when { color: var(--fg-muted); font-size: 12px; text-align: right; white-space: nowrap; }
.ai-hero { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.ai-hero .badge { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; color: #d2a8ff;
  background: #ab7df81a; border: 1px solid #ab7df84d; flex: none; }
.ai-hero h1 { margin: 0 0 4px; font-size: 24px; font-weight: 600; }
.ai-hero p { margin: 0; color: var(--fg-muted); font-size: 16px; max-width: 760px; }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 24px; align-items: start; }
.ai-step { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; }
.ai-step i { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-style: normal; font-size: 12px;
  color: var(--fg); background: var(--bg-neutral); border-radius: 50%; }
.prompt { position: relative; }
.prompt pre { margin: 0; padding: 16px; max-height: 420px; overflow: auto; font: 13px/1.55 var(--mono); white-space: pre-wrap; color: var(--fg);
  background: var(--bg-muted); border-radius: 0 0 6px 6px; }
.kv { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.kv td { padding: 10px 16px; border-top: 1px solid var(--border-muted); vertical-align: top; overflow-wrap: anywhere; }
.kv tr:first-child td { border-top: 0; }
.kv td:first-child { width: 42%; padding-right: 8px; }
.kv td:first-child a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.kv td:first-child .octicon { color: var(--fg-muted); }
.kv small { color: var(--fg-muted); }
.shell { margin: 0; padding: 12px 16px; font: 12px/1.7 var(--mono); white-space: pre-wrap; word-break: break-all; color: var(--fg); background: var(--bg-muted); }
.shell .c { color: var(--fg-muted); }
.check { list-style: none; margin: 0; padding: 12px 16px; }
.check li { display: flex; gap: 8px; padding: 4px 0; }
.check .octicon { color: var(--green-fg); margin-top: 3px; }

/* ── org page ── */
.orghead { display: flex; align-items: center; gap: 24px; padding: 8px 0 24px; }
.orghead img { width: 100px; height: 100px; border-radius: 12px; border: 1px solid var(--border-muted); }
.orghead h1 { margin: 0; font-size: 24px; font-weight: 600; }
.orghead p { margin: 4px 0 8px; color: var(--fg-muted); font-size: 16px; }
.orglinks { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.orglinks a { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); font-weight: 600; }
.orglinks .octicon, .orglinks svg { color: var(--fg-muted); fill: currentColor; }
.sec { margin: 8px 0 16px; font-size: 16px; font-weight: 400; }
.repo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.repo-card { display: flex; flex-direction: column; padding: 16px; }
.repo-card .top { display: flex; align-items: center; gap: 8px; }
.repo-card .top .octicon { color: var(--fg-muted); }
.repo-card .rname { font-weight: 600; }
.repo-card p { flex: 1; margin: 8px 0 16px; font-size: 12px; color: var(--fg-muted); }
.repo-card .meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--fg-muted); }
.repo-card .meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ── finder ── */
.finder { position: fixed; inset: 0; z-index: 50; display: none; align-items: flex-start; justify-content: center; padding-top: 10vh; background: #01040999; }
.finder.open { display: flex; }
.finder .dlg { width: min(680px, 92vw); overflow: hidden; background: var(--bg-muted); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 16px 32px #010409cc; }
.finder .inrow { display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--fg-muted); }
.finder input { flex: 1; height: 48px; padding: 0; font-size: 14px; color: var(--fg); background: transparent; border: 0; outline: none; }
.finder ul { max-height: 50vh; margin: 0; padding: 8px; overflow: auto; list-style: none; }
.finder li a { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; color: var(--fg); border-radius: 6px; }
.finder li a .octicon { color: var(--fg-muted); }
.finder li.on a, .finder li a:hover { background: var(--bg-neutral); text-decoration: none; }
.finder mark { color: var(--accent); font-weight: 600; background: none; }
.finder .hint { padding: 8px 16px; font-size: 12px; color: var(--fg-muted); border-top: 1px solid var(--border); }

/* ── footer ── */
.ft { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; max-width: 1280px; margin: 40px auto 0; padding: 24px 32px 40px; color: var(--fg-muted); font-size: 12px; }
.ft img { width: 24px; height: 24px; border-radius: 6px; opacity: .8; }
.ft nav { display: flex; flex-wrap: wrap; gap: 16px; margin-left: auto; }
.ft nav a { color: var(--fg-muted); }
.ft nav a:hover { color: var(--accent); }
.nf { padding: 96px 32px; text-align: center; }
.nf h1 { margin: 0 0 8px; font-size: 32px; }
.nf p { color: var(--fg-muted); }

/* ── highlight.js, GitHub dark ── */
.hljs { color: #e6edf3; }
.hljs-doctag, .hljs-keyword, .hljs-meta .hljs-keyword, .hljs-template-tag, .hljs-template-variable, .hljs-type, .hljs-variable.language_ { color: #ff7b72; }
.hljs-title, .hljs-title.class_, .hljs-title.class_.inherited__, .hljs-title.function_ { color: #d2a8ff; }
.hljs-attr, .hljs-attribute, .hljs-literal, .hljs-meta, .hljs-number, .hljs-operator, .hljs-variable, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-id { color: #79c0ff; }
.hljs-regexp, .hljs-string, .hljs-meta .hljs-string { color: #a5d6ff; }
.hljs-built_in, .hljs-symbol { color: #ffa657; }
.hljs-comment, .hljs-code, .hljs-formula { color: #8b949e; }
.hljs-name, .hljs-quote, .hljs-selector-tag, .hljs-selector-pseudo { color: #7ee787; }
.hljs-subst { color: #e6edf3; }
.hljs-section { color: #1f6feb; font-weight: bold; }
.hljs-bullet { color: #f2cc60; }
.hljs-emphasis { color: #e6edf3; font-style: italic; }
.hljs-strong { color: #e6edf3; font-weight: bold; }
.hljs-addition { color: #aff5b4; background-color: #033a16; }
.hljs-deletion { color: #ffdcd7; background-color: #67060c; }

/* ── narrow screens ── */
@media (max-width: 1011px) {
  .layout, .ai-grid { grid-template-columns: minmax(0, 1fr); }
  .tree-panel { display: none; }
  .relrow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .relside { flex-direction: row; flex-wrap: wrap; padding-top: 0; }
}
@media (max-width: 767px) {
  .wrap { padding: 16px; }
  .search { width: 40px; }
  .search span { display: none; }
  .btn.back span { display: none; }
  .btn.back { padding: 0 8px; }
  .gotofile, .files .cm, .commit .msg, .commit .sha, .commit .dotsep, .repohead .btn, .bar .meta-link { display: none; }
  .bar { flex-wrap: wrap; }
  .files .nm { width: auto; }
  .files .age { width: 132px; }
  .md { padding: 16px; }
  .repo-grid { grid-template-columns: minmax(0, 1fr); }
  .assets li { grid-template-columns: minmax(0, 1fr) auto; }
  .assets .dig, .assets .when { display: none; }
  .dd-panel { width: min(400px, calc(100vw - 32px)); }
}
