:root {
  --bg: #ffffff; --canvas: #f6f8fa; --fg: #1f2328; --muted: #59636e; --line: #d1d9e0; --line-soft: #e6eaef;
  --accent: #0969da; --accent-soft: #ddf4ff; --btn: #f6f8fa; --btn-hover: #eff2f5;
  --primary: #1f883d; --primary-hover: #1a7f37; --on-primary: #ffffff;
  --add-bg: #dafbe1; --add-num: #ccffd8; --add-mark: #1a7f37;
  --del-bg: #ffebe9; --del-num: #ffd7d5; --del-mark: #cf222e;
  --hunk-bg: #ddf4ff; --hunk-fg: #59636e; --empty-bg: #f6f8fa;
  --note-bg: #fff8c5; --note-line: #d4a72c;
  --stat-neutral: #d1d9e0; --danger: #cf222e;
  --syn-kw: #cf222e; --syn-str: #0a3069; --syn-com: #6e7781; --syn-num: #0550ae; --syn-fn: #8250df; --syn-type: #953800; --syn-tag: #116329; --syn-attr: #0550ae;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --tb-h: 56px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0d1117; --canvas: #151b23; --fg: #e6edf3; --muted: #9198a1; --line: #3d444d; --line-soft: #262c36;
  --accent: #4493f8; --accent-soft: #121d2f; --btn: #212830; --btn-hover: #262c36;
  --primary: #238636; --primary-hover: #29903b; --on-primary: #ffffff;
  --add-bg: #12261e; --add-num: #1b4721; --add-mark: #3fb950;
  --del-bg: #25171c; --del-num: #542426; --del-mark: #f85149;
  --hunk-bg: #121d2f; --hunk-fg: #9198a1; --empty-bg: #151b23;
  --note-bg: #272115; --note-line: #9e6a03;
  --stat-neutral: #3d444d; --danger: #f85149;
  --syn-kw: #ff7b72; --syn-str: #a5d6ff; --syn-com: #8b949e; --syn-num: #79c0ff; --syn-fn: #d2a8ff; --syn-type: #ffa657; --syn-tag: #7ee787; --syn-attr: #79c0ff;
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0d1117; --canvas: #151b23; --fg: #e6edf3; --muted: #9198a1; --line: #3d444d; --line-soft: #262c36;
  --accent: #4493f8; --accent-soft: #121d2f; --btn: #212830; --btn-hover: #262c36;
  --primary: #238636; --primary-hover: #29903b; --on-primary: #ffffff;
  --add-bg: #12261e; --add-num: #1b4721; --add-mark: #3fb950;
  --del-bg: #25171c; --del-num: #542426; --del-mark: #f85149;
  --hunk-bg: #121d2f; --hunk-fg: #9198a1; --empty-bg: #151b23;
  --note-bg: #272115; --note-line: #9e6a03;
  --stat-neutral: #3d444d; --danger: #f85149;
  --syn-kw: #ff7b72; --syn-str: #a5d6ff; --syn-com: #8b949e; --syn-num: #79c0ff; --syn-fn: #d2a8ff; --syn-type: #ffa657; --syn-tag: #7ee787; --syn-attr: #79c0ff;
  color-scheme: dark }

* { box-sizing: border-box }
body { background: var(--bg); color: var(--fg); font: 14px/1.5 var(--sans) }
button, input, textarea { font: inherit; color: inherit }
a { color: var(--accent) }
code { font-family: var(--mono); font-size: 85%; background: var(--btn-hover); padding: .1em .35em; border-radius: 6px }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px }
[hidden] { display: none !important }

.wrap { max-width: 1480px; margin: 0 auto; padding-inline: 16px }

.pr-head { padding-block: 24px 16px; border-bottom: 1px solid var(--line-soft) }
.pr-head h1 { font-size: 26px; font-weight: 400; line-height: 1.25; margin: 0 0 10px; text-wrap: balance }
.pr-head h1 .num { color: var(--muted) }
.pr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--muted) }
.state { display: inline-flex; align-items: center; gap: 4px; background: var(--btn); border: 1px solid var(--line); color: var(--fg); border-radius: 2em; padding: 2px 10px; font-size: 12px; font-weight: 500 }
.branch { font-family: var(--mono); font-size: 12px; background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 6px }
.plus { color: var(--add-mark); font-weight: 600 } .minus { color: var(--del-mark); font-weight: 600 }

.toolbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line-soft) }
.toolbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 10px }
.order-status { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; min-width: 0 }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stat-neutral); flex: none }
.dot.set { background: var(--primary) }
.spacer { flex: 1 }
.btn { background: var(--btn); border: 1px solid var(--line); border-radius: 6px; padding: 4px 12px; font-size: 12px; font-weight: 500; line-height: 20px; cursor: pointer; white-space: nowrap }
.btn:hover { background: var(--btn-hover) }
.btn.primary { background: var(--primary); border-color: transparent; color: var(--on-primary) }
.btn.primary:hover { background: var(--primary-hover) }
.btn.danger { color: var(--danger) }
.btn:disabled { opacity: .55; cursor: default }
.seg { display: inline-flex }
.seg .btn { border-radius: 0 } .seg .btn:first-child { border-radius: 6px 0 0 6px } .seg .btn + .btn { margin-left: -1px } .seg .btn:last-child { border-radius: 0 6px 6px 0 }
.seg .btn[aria-pressed="true"] { background: var(--bg); box-shadow: inset 0 0 0 1px var(--accent); position: relative }
.viewed-meter { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums }
.meter { width: 64px; height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden }
.meter i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s }
.narrow-only { display: none }

.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; padding-block: 16px 64px }
.layout.single { grid-template-columns: minmax(0, 1fr) }
.layout.single > .arrange { max-width: 960px; width: 100%; margin-inline: auto }
.tree { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--tb-h) + 16px); align-self: start; max-height: calc(100vh - var(--tb-h) - 32px); display: flex; flex-direction: column; gap: 8px; min-width: 0 }
.filter { width: 100%; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg) }
.tree-list { list-style: none; margin: 0; padding: 0; overflow: auto; min-height: 0 }
.tree-list .grp { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 4px }
.tree-list .grp:first-child { padding-top: 2px }
.tree-list a { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 4px 8px; border-radius: 6px; text-decoration: none; color: var(--fg); font-size: 13px }
.tree-list a:hover { background: var(--btn-hover) }
.tree-list a.current { background: var(--accent-soft) }
.tree-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tree-list .nm small { color: var(--muted); font-size: 11px; display: block; overflow: hidden; text-overflow: ellipsis }
.tree-list .ck { color: var(--primary); font-size: 12px }
.tree-list a.is-viewed .nm { color: var(--muted) }
.sico { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid currentColor; position: relative }
.sico::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: currentColor }
.sico.added { color: var(--add-mark) } .sico.deleted { color: var(--del-mark) } .sico.modified { color: #bf8700 }
.sico.added::after { inset: 2px 5px; border-radius: 0 }
.sico.deleted::after { inset: 5px 2px; border-radius: 0 }

main { min-width: 0; display: flex; flex-direction: column; gap: 16px }

.section-break { padding: 8px 0 0; display: grid; gap: 4px }
.section-break:not(:first-child) { padding-top: 20px }
.section-break h2 { margin: 0; font-size: 18px; font-weight: 600; text-wrap: balance }
.section-break .eyebrow { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums }
.section-break p { margin: 0; max-width: 80ch; white-space: pre-wrap }

.file { border: 1px solid var(--line); border-radius: 6px; background: var(--bg) }
.file { scroll-margin-top: calc(var(--tb-h) + 8px); transition: border-color .2s, box-shadow .2s }
.file.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) }
.file.selected > .file-head { background: var(--accent-soft) }
.tree-list a.selected { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent) }
.tree-list a.selected .nm { font-weight: 600 }
.file-head { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--tb-h)); z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; background: var(--canvas); border-radius: 6px 6px 0 0; border-bottom: 1px solid var(--line) }
.file.collapsed .file-head { border-bottom: 0; border-radius: 6px }
.chev { border: 0; background: none; padding: 2px 4px; cursor: pointer; color: var(--muted); border-radius: 4px; line-height: 1 }
.chev:hover { background: var(--btn-hover) }
.chev svg { transition: transform .15s; display: block }
.file.collapsed .chev svg { transform: rotate(-90deg) }
.diffstat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--mono); font-variant-numeric: tabular-nums }
.blocks { display: inline-flex; gap: 1px }
.blocks i { width: 8px; height: 8px; background: var(--stat-neutral) }
.blocks i.a { background: var(--add-mark) } .blocks i.d { background: var(--del-mark) }
.fpath { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--fg); text-decoration: none; min-width: 0; overflow-wrap: anywhere; flex: 1 1 240px }
.fpath:hover { color: var(--accent); text-decoration: underline }
.fpath .d { font-weight: 400; color: var(--muted) }
.badge { font-size: 11px; padding: 0 7px; border-radius: 2em; border: 1px solid; line-height: 18px }
.badge.added { color: var(--add-mark) } .badge.deleted { color: var(--del-mark) }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 3px 5px; border-radius: 6px; font-size: 12px }
.icon-btn:hover { background: var(--btn-hover); color: var(--fg) }
a.icon-btn { display: inline-flex; align-items: center; text-decoration: none }
.icon-btn.gh { opacity: .7 }
.icon-btn.gh:hover, .icon-btn.gh:focus-visible { opacity: 1 }
.viewed { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; background: var(--btn); cursor: pointer; user-select: none }
.viewed:has(input:checked) { background: var(--accent-soft); border-color: var(--accent) }
.viewed input { margin: 0; accent-color: var(--accent) }

.note { margin: 0; padding: 10px 14px; background: var(--note-bg); border-bottom: 1px solid var(--line); border-left: 3px solid var(--note-line); white-space: pre-wrap; font-size: 13px }
.note b { font-weight: 600 }
.file.collapsed .annot, .file.collapsed .file-body { display: none }
.file-body { overflow-x: auto; border-radius: 0 0 6px 6px }
.big { padding: 20px; text-align: center; color: var(--muted) }

table.diff { border-collapse: collapse; width: 100%; font: 12px/20px var(--mono); tab-size: 4 }
table.diff.split { table-layout: fixed }
table.diff td { padding: 0 10px; vertical-align: top; white-space: pre }
table.diff.split td.code { white-space: pre-wrap; word-break: break-all }
td.num { width: 1%; min-width: 50px; text-align: right; color: var(--muted); user-select: none; padding: 0 8px; font-variant-numeric: tabular-nums }
table.split td.num { width: 50px }
td.code .s { user-select: none; display: inline-block; width: 1.2ch; margin-left: -1.2ch; color: var(--muted) }
td.code { padding-left: 22px !important }
tr.add td.code, td.code.add { background: var(--add-bg) } tr.add td.num, td.num.add { background: var(--add-num) }
tr.del td.code, td.code.del { background: var(--del-bg) } tr.del td.num, td.num.del { background: var(--del-num) }
td.empty { background: var(--empty-bg) }
tr.hunk td { background: var(--hunk-bg); color: var(--hunk-fg); padding-block: 4px }
table.split td.mid { border-left: 1px solid var(--line-soft) }

.hljs-keyword, .hljs-meta .hljs-keyword, .hljs-literal, .hljs-selector-tag { color: var(--syn-kw) }
.hljs-string, .hljs-regexp { color: var(--syn-str) }
.hljs-comment { color: var(--syn-com); font-style: italic }
.hljs-number { color: var(--syn-num) }
.hljs-title, .hljs-title.function_ { color: var(--syn-fn) }
.hljs-type, .hljs-built_in, .hljs-title.class_ { color: var(--syn-type) }
.hljs-meta { color: var(--syn-num) }
.hljs-tag, .hljs-name { color: var(--syn-tag) }
.hljs-attr, .hljs-attribute, .hljs-variable { color: var(--syn-attr) }

.arrange { display: flex; flex-direction: column; gap: 12px }
.arrange-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600 }
.arrange-head p { margin: 0 0 12px; color: var(--muted); max-width: 72ch }
.arrange-head .row { display: flex; flex-wrap: wrap; gap: 8px }
.alist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px }
.arow { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 10px; border-top: 1px solid var(--line-soft); background: var(--bg) }
.arow:first-child { border-top: 0; border-radius: 6px 6px 0 0 }
.arow:last-child { border-radius: 0 0 6px 6px }
.arow.section { background: var(--canvas) }
.arow.dragging { opacity: .4 }
.arow.drop-before { box-shadow: inset 0 2px 0 var(--accent) }
.arow.drop-after { box-shadow: inset 0 -2px 0 var(--accent) }
.handle { cursor: grab; color: var(--muted); padding: 4px 0; text-align: center; user-select: none; touch-action: none; border-radius: 4px }
.handle:hover { background: var(--btn-hover) }
.amain { min-width: 0; display: grid; gap: 6px }
.apath { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; padding-top: 3px }
.apath .d { color: var(--muted) }
.apath .st { margin-left: 8px; font-family: var(--sans) }
.arow input[type=text], .arow textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; background: var(--bg) }
.arow input.stitle { font-weight: 600 }
.arow textarea { min-height: 56px; resize: vertical; font-size: 13px }
.arow .invalid { border-color: var(--danger) }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: 12px; justify-self: start }
.amove { display: flex; gap: 4px; align-items: center }
.amove .btn { padding: 2px 8px }
.arrange-bar { position: sticky; bottom: env(safe-area-inset-bottom, 0px); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line-soft) }
.arrange-bar .msg { flex: 1; color: var(--muted); font-size: 12px; min-width: 0 }
.arrange-bar .msg.err { color: var(--danger) }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) }
  .tree { position: static; max-height: 50vh; border: 1px solid var(--line); border-radius: 6px; padding: 8px }
  .tree:not(.open) { display: none }
  .narrow-only { display: inline-block }
  .hide-narrow { display: none }
  .pr-head h1 { font-size: 22px }
}
@media (prefers-reduced-motion: reduce) { .chev svg, .meter i { transition: none } }

html { color-scheme: light }
body { margin: 0 }
.state.open { background: var(--primary); border-color: transparent; color: var(--on-primary) }
.state.merged { background: #8250df; border-color: transparent; color: #ffffff }
.state.closed { background: var(--danger); border-color: transparent; color: #ffffff }
.state.draft { background: var(--muted); border-color: transparent; color: var(--bg) }
.badge.renamed { color: var(--accent) }
.pr-meta a { color: var(--muted) }

.panel { max-width: 640px; margin: 48px auto; padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); display: grid; gap: 14px }
.panel h2 { margin: 0; font-size: 20px; font-weight: 600 }
.panel p { margin: 0; color: var(--muted) }
.panel ol { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px }
.panel label { font-weight: 600; font-size: 13px; display: grid; gap: 6px }
.panel input { width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-family: var(--mono); font-size: 13px; font-weight: 400 }
.panel .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.panel .err { color: var(--danger) }
.panel .fine { font-size: 12px }

.loading { padding: 48px 0; text-align: center; color: var(--muted) }
.big a { color: var(--accent) }
.menu-link { font-size: 12px; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; padding: 0 }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 6px; font-size: 13px; z-index: 20 }

.appbar { border-bottom: 1px solid var(--line-soft); background: var(--canvas) }
.appbar .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px }
.brand { font-weight: 600; font-size: 15px; color: var(--fg); text-decoration: none; display: inline-flex; align-items: center; gap: 8px }
.brand::before { content: ""; width: 20px; height: 20px; border-radius: 5px; background: var(--primary) url("/favicon.svg") center / cover }
.usermenu { display: inline-flex; align-items: center; gap: 8px; font-size: 13px }
.avatar { width: 22px; height: 22px; border-radius: 50% }
a.btn { text-decoration: none; color: inherit; display: inline-block }
a.btn.primary { color: var(--on-primary) }
.warn { margin: 10px 0 0; padding: 8px 12px; border: 1px solid var(--note-line); background: var(--note-bg); border-radius: 6px; font-size: 13px }

.annot { border-bottom: 1px solid var(--line) }
.annot .note { border-bottom: 0 }
.annot .checks { padding: 8px 14px 10px }
.annot .note + .checks { border-top: 1px solid var(--line-soft) }
.checks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px }
.checks li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px }
.checks label { display: inline-flex; align-items: baseline; gap: 8px; cursor: pointer; min-width: 0 }
.checks input { accent-color: var(--primary); margin: 0; position: relative; top: 2px }
.checks li.done .ctext { color: var(--muted); text-decoration: line-through }
.checks .who { font-size: 12px; color: var(--primary) }
.section-break .checks { margin-top: 8px }

.acheck { display: grid; gap: 6px }
.acheck-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: center }
.acheck-box { color: var(--muted); font-size: 13px }
.hist { grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center }
.hver { font-family: var(--mono); font-size: 12px; color: var(--accent) }

.home { max-width: 880px; margin: 0 auto; padding: 40px 16px 64px; display: grid; gap: 32px }
.hero h1 { font-size: 32px; line-height: 1.2; margin: 0 0 10px; font-weight: 600; text-wrap: balance }
.hero p { margin: 0; color: var(--muted); font-size: 16px; max-width: 60ch }
.hero .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px }
.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; counter-reset: s }
.steps3 li { border: 1px solid var(--line); border-radius: 6px; padding: 14px; counter-increment: s }
.steps3 li::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; margin-bottom: 8px }
.steps3 b { display: block; margin-bottom: 4px }
.steps3 span { color: var(--muted); font-size: 13px }
.openbox { display: flex; flex-wrap: wrap; gap: 8px }
.openbox input { flex: 1 1 320px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-family: var(--mono); font-size: 13px }
.openbox .err { flex-basis: 100%; margin: 0; color: var(--danger); font-size: 13px }
.listbox h2 { font-size: 14px; margin: 0 0 8px; font-weight: 600 }
.plist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px }
.plist li { border-top: 1px solid var(--line-soft) }
.plist li:first-child { border-top: 0 }
.plist a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 14px; color: var(--fg); text-decoration: none }
.plist a:hover { background: var(--canvas) }
.plist .t { font-weight: 600; overflow-wrap: anywhere }
.plist .s { grid-column: 1; color: var(--muted); font-size: 12px }
.plist .r { grid-row: 1 / span 2; grid-column: 2; align-self: center; display: flex; gap: 6px; align-items: center }
.plist .empty { padding: 14px; color: var(--muted) }
.chip-order { font-size: 11px; border-radius: 2em; padding: 0 8px; line-height: 18px; background: var(--accent-soft); color: var(--accent) }
.tabs { display: flex; gap: 4px; margin-bottom: 8px }
.tabs .btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--accent); background: var(--bg) }
.muted { color: var(--muted) }

.doc h2 { font-size: 20px; margin: 0 0 8px; font-weight: 600 }
.doc h3 { font-size: 15px; margin: 18px 0 6px; font-weight: 600 }
.doc p { margin: 0 0 10px; max-width: 72ch }
.codeline { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; min-width: 0 }
.codeline code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas) }
.codeblock { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); overflow-x: auto; font: 12.5px/1.5 var(--mono) }
.codeblock code { background: none; padding: 0 }
.prompts { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 4px }
.plain { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 72ch }

/* Shared nav */
.navlink { color: var(--muted); text-decoration: none; font-size: 14px; padding: 4px 6px; border-radius: 6px }
.navlink:hover, .navlink[aria-current="page"] { color: var(--fg) }
.btn.lg { padding: 8px 18px; font-size: 14px; line-height: 22px }

/* Landing */
.landing { --term-bg: #0d1117; --term-fg: #e6edf3; --term-dim: #8b949e; --term-accent: #3fb950; --term-hl: #d2a8ff; --term-link: #79c0ff }
.lp-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; backdrop-filter: saturate(1.4) blur(8px); background: color-mix(in srgb, var(--canvas) 85%, transparent) }
.lp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding-block: 72px 56px }
.lp-eyebrow { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary) }
.lp-hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.025em; font-weight: 700; margin: 0 0 18px; text-wrap: balance }
.lp-lede { font-size: 18px; line-height: 1.55; color: var(--muted); margin: 0 0 24px; max-width: 34em }
.lp-cta { display: flex; flex-wrap: wrap; gap: 10px }
.lp-fine { font-size: 13px; color: var(--muted); margin: 14px 0 0 }

.lp-demo { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); box-shadow: 0 16px 40px -18px color-mix(in srgb, var(--fg) 30%, transparent); overflow: hidden }
.lp-demo-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--canvas); border-bottom: 1px solid var(--line) }
.lp-demo-title { font-weight: 600; font-size: 13px }
.lp-demo-title .muted { font-weight: 400 }
.lp-files { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; align-content: start }
.lp-file { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 6px; font: 12.5px/1.5 var(--mono); background: var(--bg); position: relative }
.lp-file:hover { background: var(--canvas) }
.lp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.lp-name .d { color: var(--muted) }
.lp-stat { flex: none; font-size: 11.5px }
.lp-sec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 10px 10px 4px; font-size: 13px }
.lp-sec:first-child { padding-top: 4px }
.lp-sec b { font-weight: 600 }
.lp-sec span { color: var(--muted); font-size: 12px }
.is-reading .lp-file { margin-left: 10px; border-left: 2px solid var(--line-soft); border-radius: 0 6px 6px 0 }
.lp-demo-cap { padding: 10px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line-soft) }

.lp-section { padding-block: 56px }
.lp-section > h2, .lp-section h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 24px; font-weight: 700; text-wrap: balance; max-width: 22em }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: st }
.lp-steps li { counter-increment: st; border-top: 2px solid var(--line); padding-top: 16px; display: grid; gap: 6px }
.lp-steps li::before { content: "0" counter(st); font: 600 12px var(--mono); color: var(--primary) }
.lp-steps b { font-size: 16px }
.lp-steps span { color: var(--muted) }

.lp-agents { background: var(--canvas); border-block: 1px solid var(--line-soft) }
.lp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center }
.lp-split p { color: var(--muted); max-width: 36em }
.lp-bullets { margin: 16px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--fg) }
.lp-term { border-radius: 10px; background: var(--term-bg); color: var(--term-fg); overflow: hidden; box-shadow: 0 20px 50px -24px rgba(0,0,0,.6) }
.lp-term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.08); font: 12px var(--mono); color: var(--term-dim) }
.lp-term-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18) }
.lp-term-bar span { margin-left: 8px }
.lp-term pre { margin: 0; padding: 16px 18px 20px; font: 12.5px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere }
.t-prompt { color: var(--term-accent); font-weight: 600 }
.t-tool { color: var(--term-accent) }
.t-dim { color: var(--term-dim) }
.t-hl { color: var(--term-hl) }
.t-link { color: var(--term-link); text-decoration: underline }

.lp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden }
.lp-grid article { background: var(--bg); padding: 22px }
.lp-grid h3 { margin: 0 0 6px; font-size: 15px }
.lp-grid p { margin: 0; color: var(--muted); font-size: 14px }

.lp-trust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start }
.lp-trust p { color: var(--muted); max-width: 34em }
.lp-facts { margin: 0; display: grid; gap: 12px }
.lp-facts div { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: grid; gap: 2px }
.lp-facts dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.lp-facts dd { margin: 0 }

.lp-faq { display: grid; gap: 8px; max-width: 760px }
.lp-faq details { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; background: var(--bg) }
.lp-faq summary { cursor: pointer; font-weight: 600 }
.lp-faq p { margin: 8px 0 0; color: var(--muted) }

.lp-final { padding-block: 64px 80px; text-align: center; display: grid; justify-items: center; gap: 20px }
.lp-final h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.02em; margin: 0; text-wrap: balance }
.lp-foot { border-top: 1px solid var(--line-soft); background: var(--canvas) }
.lp-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-block: 24px }
.lp-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px }
.lp-foot nav a { color: var(--muted); text-decoration: none; font-size: 13px }
.lp-foot nav a:hover { color: var(--fg) }

@media (max-width: 900px) {
  .lp-hero, .lp-split, .lp-trust { grid-template-columns: minmax(0, 1fr); gap: 32px }
  .lp-hero { padding-block: 40px 32px }
  .lp-steps, .lp-grid { grid-template-columns: minmax(0, 1fr) }
}

/* Docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: 40px; padding-block: 32px 64px }
.dnav, .dtoc { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow: auto; font-size: 14px }
.dnav ul, .dtoc ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 1px }
.dnav a, .dtoc a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--muted); text-decoration: none }
.dnav a:hover, .dtoc a:hover { color: var(--fg); background: var(--canvas) }
.dnav a[aria-current="page"] { color: var(--fg); background: var(--accent-soft); font-weight: 600 }
.dtoc a.current { color: var(--accent) }
.dtoc .d3 a { padding-left: 20px; font-size: 13px }
.dnav-group { margin: 12px 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
.dnav-group:first-child { margin-top: 0 }
.dmain { min-width: 0 }

.prose { max-width: 72ch; font-size: 15.5px; line-height: 1.7 }
.prose h1 { font-size: 34px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 16px; font-weight: 700 }
.prose h2 { font-size: 22px; line-height: 1.3; margin: 40px 0 12px; padding-top: 8px; border-top: 1px solid var(--line-soft); font-weight: 650; position: relative }
.prose h3 { font-size: 17px; margin: 28px 0 8px; font-weight: 650; position: relative }
.prose h2[id], .prose h3[id] { scroll-margin-top: 16px }
.prose .anchor { position: absolute; left: -1.1em; color: var(--muted); text-decoration: none; opacity: 0; padding-right: .3em }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1 }
.prose p, .prose ul, .prose ol { margin: 0 0 14px }
.prose ul, .prose ol { padding-left: 22px }
.prose li { margin: 4px 0 }
.prose a { color: var(--accent) }
.prose :not(pre) > code { font-size: 87% }
.prose .table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-top: 1px solid var(--line-soft); vertical-align: top }
.prose thead th { border-top: 0; background: var(--canvas); font-weight: 600 }
.codeblock-wrap { position: relative; margin: 0 0 16px }
.codeblock-wrap .codeblock { margin: 0; padding-right: 72px }
.codeblock-wrap .copy-code { position: absolute; top: 8px; right: 8px; padding: 2px 10px }
.llm-bar { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 40px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 8px; font-size: 13px; color: var(--muted) }
.llm-bar a { color: var(--accent) }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px }
.pager a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--fg); font-weight: 600 }
.pager a:hover { border-color: var(--accent) }
.pager small { color: var(--muted); font-weight: 400; font-size: 12px }
.pager .next { text-align: right }

@media (max-width: 1100px) { .docs { grid-template-columns: 200px minmax(0, 1fr) } .dtoc { display: none } }
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); padding-block: 16px 48px }
  .dnav { position: static; max-height: none; display: none; border: 1px solid var(--line); border-radius: 8px; padding: 10px }
  .dnav.open { display: block }
  .prose h1 { font-size: 28px }
  .prose .anchor { display: none }
}

/* Toolbar menus */
.menu-wrap { position: relative }
.btn.icon-only { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px }
.btn.icon-only svg { display: block }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--fg) 35%, transparent) }
.menu-title { margin: 4px 10px 6px; font-size: 12px; font-weight: 600; color: var(--muted) }
.menu hr { border: 0; border-top: 1px solid var(--line-soft); margin: 6px 0 }
.menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 6px 10px 6px 28px; border: 0; background: none; border-radius: 6px; font-size: 13px; text-align: left; cursor: pointer; position: relative; color: var(--fg) }
.menu button:hover, .menu button:focus-visible { background: var(--btn-hover) }
.menu button[aria-checked="true"]::before { content: "✓"; position: absolute; left: 10px; color: var(--fg) }
.menu kbd, .kbd-help kbd { margin-left: auto; font: 11px var(--mono); padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--canvas); color: var(--muted) }

/* Progress panel */
.menu.panel { width: min(340px, calc(100vw - 32px)); padding: 10px }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 60vh; overflow: auto }
.people li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 13px }
.people li.muted { display: block; padding: 4px 2px }
.people .avatar { width: 28px; height: 28px }
.people .pbody { display: grid; gap: 4px; min-width: 0 }
.people .ptop { display: flex; justify-content: space-between; gap: 8px }
.people .ptop .muted { font-size: 12px; white-space: nowrap }
.people .pstat { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums }
.people .bar { height: 5px; background: var(--line-soft); border-radius: 3px; overflow: hidden }
.people .bar i { display: block; height: 100%; background: var(--primary) }

/* Stale banner */
.stale { margin-top: 12px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; border: 1px solid var(--note-line); background: var(--note-bg); border-radius: 8px; font-size: 13px }
.stale p { margin: 0; min-width: 0 }
.stale .row { display: flex; gap: 8px; flex-wrap: wrap }

/* File header extras */
.focus-badge { font-size: 11px; font-weight: 600; padding: 0 8px; line-height: 18px; border-radius: 2em; border: 1px solid var(--line); color: var(--muted) }
.focus-badge.key { background: var(--accent-soft); border-color: var(--accent); color: var(--accent) }
.since-btn { font: 500 11.5px var(--sans); padding: 1px 8px; line-height: 18px; border-radius: 2em; border: 1px solid var(--note-line); background: var(--note-bg); color: var(--fg); cursor: pointer }
.since-btn[aria-pressed="true"] { background: var(--bg) }
.icon-btn.cmt { gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums }
.since-note { padding: 8px 14px; font-size: 12.5px; background: var(--note-bg); border-bottom: 1px solid var(--line-soft); color: var(--fg) }

/* Word-level highlighting */
tr.add td.code .wd, td.code.add .wd { background: color-mix(in srgb, var(--add-mark) 28%, transparent); border-radius: 3px }
tr.del td.code .wd, td.code.del .wd { background: color-mix(in srgb, var(--del-mark) 28%, transparent); border-radius: 3px }

/* Compact line height */
body.compact table.diff { line-height: 16px }
body.compact tr.hunk td { padding-block: 2px }

/* Section header */
.sec-head { display: flex; align-items: center; gap: 6px }
.sec-head .sec-toggle svg { transition: transform .15s }
.section-break.is-collapsed .sec-toggle svg { transform: rotate(-90deg) }
.section-break .sv.done { color: var(--primary); font-weight: 600 }
.sec-hidden { margin: 0; font-size: 12px }

/* File tree extras */
.tree-list .tkey { font-size: 10px; font-weight: 600; padding: 0 5px; border-radius: 2em; background: var(--accent-soft); color: var(--accent); vertical-align: 1px }
.tree-list a.f-skim .nm, .tree-list a.f-generated .nm { opacity: .7 }
.tree-list .ck { display: inline-flex; gap: 6px; align-items: center }
.tree-list .tc { display: inline-flex; gap: 2px; align-items: center; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums }

/* Arrange: focus select */
.apath-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between }
.afocus { font: 12px var(--sans); padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg) }

/* Keyboard help */
.kbd-help { border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; background: var(--bg); color: var(--fg); width: min(420px, calc(100vw - 32px)) }
.kbd-help::backdrop { background: color-mix(in srgb, #000 40%, transparent) }
.kbd-help h2 { margin: 0 0 12px; font-size: 16px }
.kbd-help dl { margin: 0 0 16px; display: grid; gap: 8px }
.kbd-help dl div { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; font-size: 13px }
.kbd-help dt { margin: 0 } .kbd-help dd { margin: 0 }
.kbd-help kbd { margin-left: 0 }
.kbd-help form { display: flex; justify-content: flex-end }

/* Arrange: section cards */
.arrange-summary { align-self: center; font-size: 12.5px; margin-left: auto }
.agroups { display: grid; gap: 14px }
.agroup { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden }
.agroup.lead { background: var(--canvas); border-style: dashed }
.agroup.lead-empty { display: none }
body.dragging-file .agroup.lead-empty { display: block }
.agroup.dragging { opacity: .45 }
.agroup.drop-before { box-shadow: 0 -3px 0 var(--accent) }
.agroup.drop-after { box-shadow: 0 3px 0 var(--accent) }
.agroup.drop-into { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft) }
.agroup-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; background: var(--canvas); border-bottom: 1px solid var(--line-soft) }
.agroup.closed .agroup-head { border-bottom: 0 }
.agroup.lead .agroup-head { background: transparent }
.agroup-head .chev svg { transition: transform .15s }
.agroup.closed .agroup-head .chev svg { transform: rotate(-90deg) }
.agroup-head .stitle { flex: 1 1 240px; min-width: 0; font-weight: 600; font-size: 15px; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--fg) }
.agroup-head .stitle:hover { border-color: var(--line) }
.agroup-head .stitle:focus { border-color: var(--accent); background: var(--bg); outline: none; box-shadow: 0 0 0 3px var(--accent-soft) }
.agroup-head .stitle.invalid { border-color: var(--danger) }
.lead-title { flex: 1 1 auto; font-weight: 600; color: var(--muted) }
.acount { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap }
.atools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px }
.atools .btn { padding: 2px 8px }
.chip { font: 500 12px var(--sans); padding: 2px 10px; line-height: 20px; border-radius: 2em; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer }
.chip:hover { color: var(--fg); border-color: var(--fg) }
.chip.has { color: var(--accent); border-color: var(--accent); background: var(--accent-soft) }
.chip[aria-expanded="true"] { color: var(--fg); border-color: var(--accent) }
.adetails { display: grid; gap: 8px; padding: 10px 12px 12px 44px; background: var(--canvas); border-top: 1px dashed var(--line-soft) }
.section-details { padding-left: 12px; border-top: 0; border-bottom: 1px solid var(--line-soft) }
.adetails textarea { width: 100%; min-height: 64px; resize: vertical; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--bg); font-size: 13px }
.adetails .acheck-row input { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; background: var(--bg) }
.adetails .invalid { border-color: var(--danger) }
.afiles { list-style: none; margin: 0; padding: 4px 0 }
.afile { border-top: 1px solid var(--line-soft) }
.afile:first-child { border-top: 0 }
.afile.dragging { opacity: .4 }
.afile.drop-before { box-shadow: inset 0 2px 0 var(--accent) }
.afile.drop-after { box-shadow: inset 0 -2px 0 var(--accent) }
.afile.is-key .aname b { color: var(--accent) }
.afile-line { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 12px }
.afile:hover { background: color-mix(in srgb, var(--canvas) 60%, transparent) }
.aname { font: 12.5px/1.45 var(--mono); min-width: 0; overflow-wrap: anywhere }
.aname .d { color: var(--muted) }
.aname b { font-weight: 600 }
.amoveto { font: 12px var(--sans); padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); max-width: 150px }
.aempty { padding: 14px 16px; color: var(--muted); font-size: 13px; text-align: center }
.add-below { margin: 0 12px 10px; font-size: 12px }
.agroup.closed .add-below { display: none }
@media (max-width: 700px) {
  .afile-line { grid-template-columns: 22px minmax(0, 1fr) }
  .afile-line .atools { grid-column: 1 / -1; padding-left: 32px }
  .adetails { padding-left: 12px }
}

/* Shared: state icons, labels, order badges */
.sicon { flex: none; display: block }
.sicon.s-open { color: var(--primary) }
.sicon.s-draft { color: var(--muted) }
.sicon.s-merged { color: #8250df }
.sicon.s-closed { color: var(--danger) }
.lbl { display: inline-block; margin-left: 6px; padding: 0 8px; line-height: 18px; font-size: 11.5px; font-weight: 500; border-radius: 2em; vertical-align: 1px; color: var(--fg); background: color-mix(in srgb, var(--lc) 22%, transparent); border: 1px solid color-mix(in srgb, var(--lc) 55%, transparent) }
.obadge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 2em; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); white-space: nowrap }
.onone { font-size: 12px; color: var(--muted); white-space: nowrap }
.oarrange { font-size: 12px; font-weight: 600; padding: 1px 10px; border-radius: 2em; border: 1px solid var(--line); color: var(--accent); text-decoration: none; white-space: nowrap }
.oarrange:hover { border-color: var(--accent); background: var(--accent-soft) }
.mine { color: var(--accent) }
.dotsep { color: var(--muted); margin: 0 4px }

/* Pull request list */
.plist-page { padding-block: 28px 64px; max-width: 1100px }
.repo-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 8px }
.repo-title { display: flex; align-items: center; gap: 10px; min-width: 0 }
.repo-avatar { width: 32px; height: 32px; border-radius: 8px }
.repo-title h1 { margin: 0; font-size: 22px; font-weight: 400; overflow-wrap: anywhere }
.repo-title h1 a { color: var(--accent); text-decoration: none }
.repo-title h1 b { font-weight: 600 }
.pl-summary { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; min-height: 1.4em }
.pl-summary b { color: var(--fg); font-variant-numeric: tabular-nums }
.pl-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px }
.tabs { display: inline-flex; background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px }
.tab { border: 0; background: none; padding: 4px 12px; border-radius: 6px; font: 500 13px var(--sans); color: var(--muted); cursor: pointer }
.tab[aria-selected="true"] { background: var(--bg); color: var(--fg); box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line) }
.pl-search { flex: 1 1 260px; width: auto }
.pl-sort { font: 13px var(--sans); padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg) }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px }
.pl-chips .chip[aria-pressed="true"] { color: var(--fg); background: var(--accent-soft); border-color: var(--accent) }
.pl { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg) }
.prow { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line-soft); cursor: pointer }
.prow:first-child { border-top: 0 }
.prow:hover { background: var(--canvas) }
.prow .sicon { margin-top: 3px }
.pmain { min-width: 0; display: grid; gap: 4px }
.ptitle { font-size: 15px; line-height: 1.4 }
.ptitle a { color: var(--fg); font-weight: 600; text-decoration: none }
.ptitle a:hover { color: var(--accent); text-decoration: underline }
.pmeta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere }
.pmeta b { color: var(--fg); font-weight: 500 }
.pmeta code { font-size: 11.5px; padding: 0 5px; background: var(--accent-soft); color: var(--accent) }
.pside { display: grid; grid-template-columns: auto 64px 72px; gap: 14px; align-items: center; justify-items: end; padding-top: 2px }
.porder { display: grid; justify-items: end; gap: 2px }
.porder small { font-size: 11px }
.previewers { display: flex; flex-direction: row-reverse; justify-content: flex-end }
.ravatar { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -6px; background: var(--canvas) }
.pupdated { font-size: 12px; white-space: nowrap }
.pl-empty { padding: 40px 16px; text-align: center; color: var(--muted) }
.pl-more { display: flex; justify-content: center; margin-top: 14px }
.skel { cursor: default }
.sk { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--line-soft), var(--canvas), var(--line-soft)); background-size: 200% 100%; animation: sk 1.2s linear infinite }
.sk-icon { width: 16px; height: 16px; border-radius: 50% }
.sk-title { width: 55%; height: 14px } .sk-meta { width: 35%; height: 10px }
@keyframes sk { to { background-position: -200% 0 } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none } }
@media (max-width: 760px) {
  .prow { grid-template-columns: 16px minmax(0, 1fr) }
  .pside { grid-column: 2; grid-template-columns: auto auto 1fr; justify-items: start; padding-top: 0 }
  .pupdated { justify-self: end }
}

/* Dashboard */
.dash { padding-block: 28px 64px; max-width: 1100px }
.dash-signin { max-width: 560px; margin: 48px auto; text-align: center; display: grid; gap: 14px; justify-items: center }
.dash-signin h1 { margin: 0; font-size: 28px; letter-spacing: -.01em; text-wrap: balance }
.dash-signin p { margin: 0; color: var(--muted) }
.dash-head { display: grid; gap: 10px; margin-bottom: 18px }
.dash-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em }
.dash-open input { font-size: 14px; padding: 9px 12px }
.dash-tip { margin: 0; font-size: 12.5px }
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px }
.dstat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; background: var(--bg) }
.dstat b { font-size: 22px; font-variant-numeric: tabular-nums }
.dstat span { font-size: 12px; color: var(--muted) }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start }
.dash-main, .dash-side { display: grid; gap: 18px; min-width: 0 }
.dcard { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden }
.dcard > p, .dcard > .codeline, .dcard > .btn { margin: 0 14px 12px }
.dcard > .btn { display: inline-block; margin-bottom: 14px }
.dcard-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 14px 8px }
.dcard-head h2 { margin: 0; font-size: 14px; font-weight: 600 }
.dcard-head .muted { font-size: 12px; font-variant-numeric: tabular-nums }
.dlist { list-style: none; margin: 0; padding: 0 }
.dlist li { border-top: 1px solid var(--line-soft) }
.drow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; color: var(--fg); text-decoration: none }
.drow:hover { background: var(--canvas) }
.drow-main { display: grid; gap: 2px; min-width: 0 }
.drow-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.drow-meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere }
.drow-side { display: grid; justify-items: end; gap: 4px; font-size: 12px }
.rv-count { font-size: 12px; color: var(--muted); white-space: nowrap }
.rv-count.on { color: var(--primary); font-weight: 600 }
.dempty { padding: 16px 14px; color: var(--muted); font-size: 13px }
.repo-links { list-style: none; margin: 0; padding: 0 0 6px }
.repo-links a { display: flex; align-items: center; gap: 2px; padding: 7px 14px; color: var(--fg); text-decoration: none; font-size: 13.5px }
.repo-links a:hover { background: var(--canvas) }
.repo-links .chev-r { margin-left: auto; color: var(--muted) }
.agent-card .codeline code { font-size: 11.5px }
.agent-card .fine { font-size: 12px; color: var(--muted) }
.onboard { padding-bottom: 14px }
.onboard h2 { margin: 14px 14px 8px; font-size: 14px }
.onboard-steps { margin: 0 14px; padding-left: 20px; display: grid; gap: 12px }
.onboard-steps li { display: grid; gap: 4px }
.onboard-steps span { color: var(--muted); font-size: 13px }
.onboard-steps .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px }
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) }
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
