.cli-panel pre, .docs-content pre { background:#0f172a; color:#e2e8f0; padding:.8rem 1rem; border-radius:8px; overflow-x:auto; font-size:.88rem; line-height:1.5; margin:.3rem 0 .9rem; }
.cli-panel h4 { margin:.6rem 0 .1rem; font-size:.95rem; }
.cli-tabs { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.6rem; }
.cli-tabs button { font:inherit; padding:.3rem .7rem; border-radius:999px; border:1px solid var(--border); background:transparent; color:inherit; cursor:pointer; }
.cli-tabs button[aria-selected="true"] { background:var(--brand, #0b8b6f); color:#fff; border-color:transparent; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.88em; word-break:break-all; }
.src-tag { font-size:.75rem; padding:.05rem .45rem; border-radius:999px; border:1px solid var(--border); margin-left:.4rem; opacity:.85; }
.gap-note { border-left:3px solid #d97706; padding:.4rem .8rem; margin:.6rem 0; font-size:.9rem; }
.page-head { color:#c9d1d9; }
.page-head a { color:#58a6ff; }
.page-head .src-tag { color:#8b949e; border-color:#30363d; }
.repo-head h1 { margin:.2rem 0; font-size:1.6rem; }
.repo-head h1 a { color:#c9d1d9; }
.repo-head h1 a:hover { color:#fff; text-decoration:none; }
.kv { display:grid; grid-template-columns:max-content 1fr; gap:.3rem 1rem; font-size:.92rem; }

/* Auth in nav */
#nav-auth { display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; }
#nav-auth .nav-user { color:#c9d1d9; font-weight:600; padding:.35rem .5rem; }
#nav-auth .btn { padding:.35rem .7rem; font-size:.9rem; }
#nav-auth button.btn { cursor:pointer; font:inherit; }

/* Repo tabs, clone, tree, blob */
.repo-title { display:flex; align-items:baseline; gap:.5rem; flex-wrap:wrap; }
.repo-title h1 { margin:0; font-size:1.5rem; }
.repo-tabs { display:flex; gap:0; border-bottom:1px solid var(--border); margin:0 0 1rem; }
.repo-tabs a {
  padding:.7rem 1rem; color:var(--text); border-bottom:2px solid transparent; font-weight:600;
}
.repo-tabs a:hover { text-decoration:none; color:var(--accent); }
.repo-tabs a[aria-current="page"] { border-bottom-color:var(--accent); color:var(--accent); }
.file-toolbar {
  display:flex; align-items:center; justify-content:space-between; gap:.75rem; flex-wrap:wrap;
  margin-bottom:.75rem;
}
.branch-select { display:inline-flex; align-items:center; gap:.4rem; }
.branch-select select {
  font:inherit; background:var(--panel); color:var(--text); border:1px solid var(--border);
  border-radius:.5rem; padding:.35rem .55rem;
}
.clone-box {
  display:flex; align-items:stretch; gap:0; border:1px solid var(--border); border-radius:.5rem;
  overflow:hidden; min-width:min(100%, 28rem); max-width:100%;
}
.clone-box code {
  display:block; padding:.45rem .7rem; font-size:.82rem; background:var(--panel-alt);
  overflow-x:auto; white-space:nowrap; flex:1;
}
.clone-box button {
  border:0; border-left:1px solid var(--border); background:var(--panel); color:var(--text);
  padding:.35rem .7rem; cursor:pointer; font:inherit; font-weight:600; white-space:nowrap;
}
.clone-box button:hover { background:var(--chip); }
.commit-bar {
  display:flex; flex-wrap:wrap; gap:.5rem 1rem; align-items:baseline;
  background:var(--panel-alt); border:1px solid var(--border); border-bottom:0;
  border-radius:.6rem .6rem 0 0; padding:.55rem .8rem; font-size:.9rem;
}
.commit-bar .msg { font-weight:600; }
.crumbs { display:flex; flex-wrap:wrap; gap:.25rem; align-items:center; font-size:.92rem; margin:.4rem 0 .6rem; }
.crumbs a { font-weight:600; }
.file-table {
  width:100%; border-collapse:collapse; background:var(--panel);
  border:1px solid var(--border); border-radius:0 0 .6rem .6rem; overflow:hidden;
}
.file-table a { color:var(--text); }
.file-table a:hover { color:var(--link); }
.file-table td, .file-table th {
  padding:.45rem .75rem; border-top:1px solid var(--border); text-align:left;
}
.file-table tr:first-child td { border-top:0; }
.file-table .kind { color:var(--muted); font-size:.8rem; width:6.5rem; }
.file-table .size { color:var(--muted); font-size:.8rem; text-align:right; width:6rem; font-variant-numeric:tabular-nums; }
.readme-wrap { margin-top:1.25rem; }
.readme-wrap h2 { margin-bottom:.5rem; }
.md-body h1, .md-body h2, .md-body h3, .md-body h4, .md-body h5, .md-body h6 { margin-top:1.1rem; }
.md-body pre { background:#0f172a; color:#e2e8f0; padding:1rem; border-radius:8px; overflow-x:auto; }
.md-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.92em; }
.md-body :not(pre) > code { background:rgba(127,127,127,.15); padding:.1em .35em; border-radius:4px; }
.md-body img { max-width: 100%; height: auto; }
.md-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.md-body th, .md-body td { border: 1px solid var(--border); padding: .35rem .6rem; }
.md-body blockquote { margin: .8rem 0; padding-left: .9rem; border-left: 3px solid var(--border); color: var(--muted); }
.blob-frame { border:1px solid var(--border); border-radius:.6rem; overflow:auto; background:var(--panel); }
.blob-table { width:100%; border-collapse:collapse; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.82rem; line-height:1.45; }
.blob-table .ln {
  width:1%; text-align:right; color:var(--muted); padding:.05rem .75rem; user-select:none;
  border-right:1px solid var(--border); vertical-align:top;
}
.blob-table .src { padding:.05rem .75rem; white-space:pre; }
.binary-note { padding:1rem; }
.pr-item { grid-template-columns:1fr auto; gap:.35rem .8rem; }
.pr-item .pr-meta { grid-column:1 / -1; color:var(--muted); font-size:.85rem; }
.pr-detail h2 { margin: .2rem 0 .4rem; }
.pr-meta-row { display:flex; flex-wrap:wrap; gap:.5rem 1rem; align-items:center; margin: .4rem 0 1rem; }
.pr-actions { display:flex; gap:.5rem; flex-wrap:wrap; margin: .8rem 0 1.2rem; }
.pr-state { text-transform: capitalize; }
.diff-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .35rem; }
.diff-item { font-size: .9rem; }
.diff-item .st { font-size: .75rem; margin-right: .4rem; text-transform: uppercase; }
.diff-item .st.add { color: #3fb950; }
.diff-item .st.del { color: #f85149; }
.diff-item .st.mod { color: #d29922; }
.diff-file { margin: .8rem 0 1.2rem; border: 1px solid var(--border); border-radius: .6rem; overflow: hidden; }
.diff-file h4 { margin: 0; padding: .45rem .75rem; background: var(--panel-alt); font-size: .9rem; }
.diff-file-head {
  display:flex; flex-wrap:wrap; gap:.5rem .85rem; align-items:center;
  margin: 0; padding: .5rem .75rem; background: var(--panel-alt); font-size: .9rem;
}
.diff-file-head .diff-path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; }
.diff-hunk { margin: 0; background: #0d1117; color: #e6edf3; padding: .6rem .8rem; overflow-x: auto; font-size: .8rem; line-height: 1.45; }
.diff-hunk .add { color: #3fb950; }
.diff-hunk .del { color: #f85149; }
.diff-hunk .meta { color: #8b949e; }
.diff-hunk-wrap { overflow:auto; background:#0d1117; }
.diff-table { width:max-content; min-width:100%; border-collapse:collapse; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.8rem; line-height:1.45; color:#e6edf3; }
.diff-table td { padding:0 .55rem; vertical-align:top; }
.diff-table .ln { width:1%; text-align:right; color:#6e7681; user-select:none; cursor:pointer; font-variant-numeric:tabular-nums; border-right:1px solid #21262d; }
.diff-table .mark { width:1%; color:#8b949e; user-select:none; }
.diff-table .src { white-space:pre; cursor:pointer; }
.diff-table .src code.hljs { background:transparent; padding:0; font:inherit; color:inherit; }
.diff-table tr.diff-line.add { background: rgba(46,160,67,.18); }
.diff-table tr.diff-line.add .mark { color:#3fb950; }
.diff-table tr.diff-line.del { background: rgba(248,81,73,.18); }
.diff-table tr.diff-line.del .mark { color:#f85149; }
.diff-table tr.diff-line:hover { outline:1px solid #30363d; }
.diff-expand-bar { background:#161b22; border-top:1px solid #30363d; border-bottom:1px solid #30363d; }
.diff-expand {
  display:block; width:100%; font:inherit; font-size:.82rem; font-weight:600; color:#58a6ff;
  background:transparent; border:0; cursor:pointer; padding:.4rem .8rem; text-align:center;
}
.diff-expand:hover { text-decoration:underline; background:#1f242c; }
.diff-table tr.comment-row td { white-space:normal; background:#161b22; padding:.6rem .75rem; cursor:default; }
.pr-sticky { position:sticky; left:0; width:min(48rem, calc(100vw - 6rem)); }
.pr-subtabs { display:flex; gap:0; border-bottom:1px solid var(--border); margin: 0 0 1rem; }
.pr-subtabs a {
  padding:.55rem .95rem; color:var(--text); border-bottom:2px solid transparent; font-weight:600;
}
.pr-subtabs a:hover { text-decoration:none; color:var(--accent); }
.pr-subtabs a[aria-current="page"] { border-bottom-color:var(--accent); color:var(--accent); }
.pr-title-box { margin-bottom: 1.1rem; }
.pr-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:.75rem; flex-wrap:wrap; }
.pr-title-row h2 { margin:0; flex:1; }
.pr-comments, .pr-approvals { margin: 1.1rem 0; }
.pr-comment { border:1px solid var(--border); border-radius:.5rem; padding:.65rem .8rem; margin:.5rem 0; background:var(--panel); }
.pr-comment-meta { display:flex; flex-wrap:wrap; gap:.45rem .8rem; align-items:center; margin-bottom:.35rem; }
.pr-comment-body { white-space:pre-wrap; word-break:break-word; }
.pr-add-comment, .pr-inline-form { margin:.6rem 0 0; }
.pr-inline-form textarea, .pr-add-comment textarea, .pr-title-box textarea { width:100%; }
.pr-approval-list { list-style:none; padding:0; margin:0 0 .75rem; }
.pr-approval-list li { padding:.25rem 0; display:flex; flex-wrap:wrap; gap:.35rem .6rem; align-items:center; }
.owner-badge {
  font-size:.7rem; font-weight:700; letter-spacing:.02em; text-transform:uppercase;
  padding:.05rem .45rem; border-radius:999px; border:1px solid var(--accent); color:var(--accent);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
}
.pr-comment.is-resolved { opacity:.62; background: var(--panel-alt); }
.pr-comment.is-collapsed .pr-comment-body { display:none; }
.pr-comment .resolve-toggle { display:inline-flex; align-items:center; gap:.3rem; font-size:.85rem; margin-left:auto; }
.pr-comment .resolve-toggle input { margin:0; }
.merge-reasons { margin:.5rem 0 0; padding-left:1.2rem; color:#f85149; font-size:.9rem; }
.merge-note { font-size:.85rem; color:var(--muted); margin:.35rem 0 .6rem; }
.owner-list { list-style:none; padding:0; margin:0 0 1rem; }
.owner-list li { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.45rem 0; border-bottom:1px solid var(--border); }
.owner-add { display:flex; flex-wrap:wrap; gap:.5rem; align-items:flex-end; margin:.5rem 0 1.25rem; }
.owner-add label { display:flex; flex-direction:column; gap:.25rem; flex:1; min-width:12rem; }
.danger-zone {
  margin:2rem 0 1rem; padding:1rem 1.1rem; border:1px solid #f85149; border-radius:.6rem;
  background: color-mix(in oklab, #f85149 8%, transparent);
}
.danger-zone h2 { color:#f85149; margin-top:0; }
.danger-zone .confirm-input { width:min(100%, 22rem); }
.btn-danger {
  background:#da3633; color:#fff; border-color:#f85149;
}
.btn-danger:hover { filter:brightness(1.05); }
.btn:disabled, .btn-danger:disabled { opacity:.45; cursor:not-allowed; filter:none; }
.btn-tiny { padding:.15rem .45rem; font-size:.8rem; }
.cli-panel { margin: 1.25rem 0 0; }
.auth-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
@media (max-width: 800px) { .auth-grid { grid-template-columns:1fr; } }
.form-error { color:#f85149; margin:.5rem 0 0; }
.form-ok { color:var(--accent); margin:.5rem 0 0; }
.pay-prompt {
  border:1px solid color-mix(in oklab, var(--warn), var(--border) 40%);
  background: color-mix(in oklab, var(--warn) 12%, transparent);
  border-radius:.6rem; padding:.85rem 1rem; margin:1rem 0;
}
.conflict-sample { background:#0f172a; color:#e2e8f0; padding:1rem; border-radius:8px; overflow-x:auto; font-size:.88rem; }
.conflict-sample .mark { color:#ff7b72; }
.muted { color: var(--muted); }
.blob-head {
  display:flex; justify-content:space-between; align-items:center; gap:.75rem; flex-wrap:wrap;
  padding:.5rem .8rem; border:1px solid var(--border); border-bottom:0;
  border-radius:.6rem .6rem 0 0; background:var(--panel-alt); font-size:.9rem;
}
.blob-frame.with-head { border-radius: 0 0 .6rem .6rem; }
.json-dump { background:#0f172a; color:#e2e8f0; padding:1rem; border-radius:8px; overflow-x:auto; font-size:.82rem; }
.page .repo-tabs { margin-top:.25rem; }
/* topbar */
.topbar .header-inner { gap: 1rem; }
.topbar-left { display:flex; align-items:center; gap:.9rem; min-width:0; flex:1; }
.topbar-link { font-weight:600; text-decoration:none; }
.topbar-crumbs { display:flex; align-items:center; gap:.35rem; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:.95rem; }
.topbar-crumbs .sep { opacity:.5; }
.topbar-crumbs a { text-decoration:none; }
.ref-chip { font-size:.75rem; padding:.05rem .45rem; border:1px solid var(--border); border-radius:999px; margin-left:.3rem; }
.nav-user { font-weight:600; margin: 0 .4rem; }
#nav-auth { display:flex; align-items:center; gap:.4rem; }
body:not(.is-home) .nav-toggle { display:none; }
/* code view */
.code-wrap { display:grid; grid-template-columns:max-content 1fr; overflow-x:auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.85rem; line-height:1.5; background:#0d1117; color:#e6edf3; border-radius:0 0 8px 8px; }
.code-wrap pre { margin:0; padding:.6rem .8rem; background:transparent; font:inherit; line-height:inherit; }
.code-wrap .ln-col { text-align:right; color:#6e7681; user-select:none; border-right:1px solid #30363d; }
.code-wrap code.hljs { background:transparent; padding:0; font:inherit; }
@media (max-width: 820px) {
  .topbar .site-nav { position: static; transform: none; border: 0; box-shadow: none; background: transparent; }
  #marketing-nav { display: none !important; }
  .topbar-crumbs { font-size: .85rem; }
}

/* CI checks */
.pr-checks { margin: 1rem 0; }
.pr-checks .checks-head { display:flex; align-items:baseline; gap:.75rem; flex-wrap:wrap; }
.pr-checks .checks-head h3 { margin:0; }
.check-list { list-style:none; margin:.5rem 0 0; padding:0; border:1px solid var(--border); border-radius:.6rem; overflow:hidden; }
.check-item { border-top:1px solid var(--border); }
.check-item:first-child { border-top:0; }
.check-row { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.45rem .7rem; }
.check-toggle { all:unset; cursor:pointer; display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; min-width:0; }
.check-toggle:focus-visible { outline:2px solid var(--accent); border-radius:.3rem; }
.check-icon { display:inline-flex; width:1.25rem; height:1.25rem; align-items:center; justify-content:center; border-radius:50%; font-size:.8rem; font-weight:700; color:#fff; background:#6e7781; flex:none; }
.check-success .check-icon { background:#1a7f37; }
.check-failure .check-icon, .check-error .check-icon { background:#cf222e; }
.check-running .check-icon { background:#bf8700; animation: checkpulse 1.2s ease-in-out infinite; }
.check-queued .check-icon, .check-missing .check-icon { background:#8c959f; }
@keyframes checkpulse { 50% { opacity:.45; } }
.check-state { font-size:.8rem; text-transform:uppercase; letter-spacing:.03em; opacity:.75; }
.check-summary { font-size:.88rem; opacity:.85; }
.check-meta { display:flex; align-items:center; gap:.6rem; font-size:.85rem; white-space:nowrap; }
.check-log { margin:0; max-height:24rem; overflow:auto; background:#0d1117; color:#e6edf3; padding:.7rem .9rem; font-size:.8rem; border-top:1px solid var(--border); white-space:pre-wrap; }
.checks-rollup { display:inline-flex; align-items:center; gap:.4rem; font-size:.9rem; }
.pr-code-checks { margin-bottom:1rem; }
.runner-token { margin-top:.75rem; }
