:root {
  --ink: #142033;
  --blue: #1f6feb;
  --blue-deep: #0c3f86;
  --blue-soft: #e7f0ff;
  --paper: #f3f6fb;
  --card: #ffffff;
  --line: #d5e0ee;
  --muted: #5c6b80;
  --bad: #9f2d2d;
  --ok: #146c43;
  --shadow: 0 4px 16px rgba(20, 32, 51, 0.12);
  --font: "Segoe UI", "Avenir Next", "Noto Sans", Ubuntu, Cantarell, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --fs: 14px;
  --fs-sm: 12px;
  --fs-h: 20px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --radius: 4px;
  --radius-lg: 8px;
  --control-h: 32px;
  --sidebar: 240px;
  --content: 1180px;
  --top-h: 48px;
  font-family: var(--font);
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: var(--fs); line-height: 1.5; }
a { color: var(--blue-deep); }
h1 { font-size: var(--fs-h); font-weight: 600; line-height: 1.3; margin: 0 0 var(--sp-3); }
h2 { font-size: 16px; font-weight: 600; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  height: var(--top-h); padding: 0 var(--sp-4); background: var(--ink); color: white;
  position: sticky; top: 0; z-index: 40; max-width: 100%;
}
.top a { color: white; text-decoration: none; }
.brand { display: flex; gap: var(--sp-2); align-items: center; font-weight: 600; letter-spacing: 0.01em; font-size: 16px; }
.brand img { width: 28px; height: 28px; }
.top nav { display: flex; gap: var(--sp-4); align-items: center; }
.top button, .btn, button {
  background: var(--blue); color: white; border: 0; border-radius: var(--radius);
  min-height: var(--control-h); padding: 0 var(--sp-3); cursor: pointer; font: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1);
}
.btn.ghost, button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.top button { background: transparent; border: 1px solid rgba(255,255,255,.35); color: white; }
.frame { display: flex; align-items: flex-start; min-height: calc(100vh - var(--top-h)); }
.frame.with-side .content { flex: 1; min-width: 0; }
.content { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: flex-start; }
main, main.wide {
  width: min(100%, var(--content));
  max-width: var(--content);
  min-width: 0;
  margin: 0;
  padding: var(--sp-4) var(--sp-5) var(--sp-6);
}
.sidenav {
  width: var(--sidebar); flex: none; position: sticky; top: var(--top-h);
  height: calc(100vh - var(--top-h)); overflow: auto;
  background: var(--card); border-right: 1px solid var(--line);
}
.sidecontext {
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: 56px; padding: var(--sp-3);
  border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none;
}
.sidename { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidenav-links { display: flex; flex-direction: column; padding: var(--sp-2) 0; }
.sidenav-links a {
  display: flex; align-items: center; min-height: var(--control-h);
  margin: 1px var(--sp-2); padding: 0 var(--sp-3);
  border-radius: var(--radius); text-decoration: none; color: var(--ink);
  font-weight: 400; box-shadow: inset 3px 0 0 transparent;
}
.sidenav-links a.on {
  background: var(--blue-soft); color: var(--blue-deep); font-weight: 400;
  box-shadow: inset 3px 0 0 var(--blue);
}
.pagehead {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); min-height: 40px; margin: 0 0 var(--sp-4);
}
.pagehead h1 {
  margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pageacts { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.pageacts .menu-panel { text-align: left; }
.hero { display: grid; grid-template-columns: 120px 1fr; gap: 1.2rem; align-items: center; }
.hero img { width: 120px; }
.card, .panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-4); margin: var(--sp-3) 0;
}
.flash { padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); background: #e5f6ec; color: var(--ok); }
.flash.bad { background: #fde8e8; color: var(--bad); }
.tabs, .sub {
  display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: flex-end;
  margin: 0 0 var(--sp-4); min-height: 40px; border-bottom: 1px solid var(--line);
}
.sub a {
  text-decoration: none; color: var(--muted); font-weight: 400;
  padding: var(--sp-2) 0; margin-bottom: -1px; border-bottom: 2px solid transparent;
}
.muted { color: var(--muted); }
.preview {
  margin: 0 0 var(--sp-2); color: var(--muted); word-break: break-all;
  min-height: 1.2rem; display: flex; gap: .7rem; align-items: baseline; flex-wrap: wrap;
}
.preview:empty { display: none; }
label { display: block; margin: 0.55rem 0; }
input[type="checkbox"], input[type="radio"], input[type="hidden"] { width: auto; min-height: 0; }
input, textarea, select {
  width: 100%; min-height: var(--control-h); padding: 4px var(--sp-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: var(--fs); background: white;
}
textarea { min-height: 7rem; }
.row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.row > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.row > select, .row > button, .row > .btn { width: auto; flex: 1 1 8rem; min-width: 0; }
code, pre { font-family: var(--mono); }
pre, .code {
  background: #0f1b2d; color: #e7eef8; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg); overflow: auto;
}
form.wh .wh-field { display: none; }
form.wh[data-preset="custom"] .for-custom,
form.wh[data-preset="generic"] .for-generic,
form.wh[data-preset="discord"] .for-discord,
form.wh[data-preset="slack"] .for-slack,
form.wh[data-preset="teams"] .for-teams,
form.wh[data-preset="mattermost"] .for-mattermost,
form.wh[data-preset="rocketchat"] .for-rocketchat,
form.wh[data-preset="telegram"] .for-telegram,
form.wh[data-preset="matrix"] .for-matrix,
form.wh[data-preset="googlechat"] .for-googlechat,
form.wh[data-preset="ntfy"] .for-ntfy,
form.wh[data-preset="gotify"] .for-gotify,
form.wh[data-preset="grok"] .for-grok { display: block; }
form.wh .wh-field .muted { display: block; margin-top: 0.25rem; }
ul.clean { list-style: none; padding: 0; }
ul.clean li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.pill { font-size: 0.78rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.45rem; }
table { width: 100%; border-collapse: collapse; }
.hscroll { overflow-x: auto; max-width: 100%; }
.heat, .heat-scroll { max-width: 100%; }
td, th { text-align: left; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); vertical-align: top; font-size: var(--fs); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) {
  .hero, .grid-2 { grid-template-columns: 1fr; }
  main, main.wide { padding: var(--sp-3); }
  .brand { font-size: 0; gap: 0; }
  .brand img { width: 28px; height: 28px; }
  .top { padding: 0 var(--sp-2); gap: var(--sp-2); }
  .top nav { gap: var(--sp-2); min-width: 0; overflow-x: auto; }
}
.sub a.on { border-bottom-color: var(--blue); color: var(--blue-deep); background: var(--blue-soft); font-weight: 400; }
.crumbs { color: var(--muted); margin: 0 0 var(--sp-2); min-height: 20px; font-size: var(--fs-sm); }
.crumbs a { color: var(--muted); text-decoration: none; }
.projhead { display: flex; align-items: center; gap: 0.7rem; }
.projhead h1 { margin: 0; font-size: var(--fs-h); }
.tile {
  width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center;
  background: #e56a93; color: white; font-weight: 700; font-size: 1.2rem;
}
.vis { width: 18px; height: 18px; color: var(--muted); }
.ficon { width: 16px; height: 16px; vertical-align: -2px; margin-right: 0.25rem; }
.proj { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.2rem; align-items: start; }
.toolbar { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; margin: 0.9rem 0; flex-wrap: wrap; }
.toolbar .left, .toolbar .right { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }
.branch select { width: auto; border-radius: 8px; padding: 0.35rem 0.5rem; background: #f6f8fa; }
.pathnow { color: var(--ink); }
.pathnow a { color: inherit; text-decoration: none; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: 2.3rem; z-index: 4; width: min(420px, 80vw);
  background: white; border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem;
  box-shadow: var(--shadow);
}
.copyline { display: flex; gap: 0.4rem; }
.copyline input { font-family: ui-monospace, monospace; font-size: 0.85rem; }
.commitbar {
  display: flex; gap: 0.7rem; align-items: center; background: #f6f8fa;
  border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.75rem; margin: 0.4rem 0 0.8rem;
}
.commitbar .grow { flex: 1; min-width: 0; }
.commitbar .subject { display: block; font-weight: 650; color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #d5e0ee; color: var(--ink);
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; flex: none;
}
img.avatar { object-fit: cover; display: block; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.35rem; }
.commitwho a { color: var(--ink); font-weight: 650; text-decoration: none; }
.commitwho a:hover { text-decoration: underline; }
ul.clean li.commitline { display: flex; gap: 0.65rem; align-items: center; }
.sha { background: white; border: 1px solid var(--line); border-radius: 6px; padding: 0.15rem 0.4rem; }
table.files { background: white; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
table.files th { color: var(--muted); font-weight: 600; font-size: 0.92rem; }
table.files td.msg { max-width: 280px; }
table.files td.msg a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; }
table.tags { width: 100%; background: white; border: 1px solid var(--line); border-radius: var(--radius-lg); border-collapse: collapse; }
table.tags th, table.tags td { text-align: left; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); vertical-align: top; }
table.tags th { color: var(--muted); font-weight: 600; font-size: 0.92rem; }
table.tags td.acts { white-space: nowrap; }
table.tags td.acts a { margin-right: 0.55rem; }
.tagmsg { white-space: pre-wrap; }
.readme, .codebox, .side {
  background: white; border: 1px solid var(--line); border-radius: 12px; margin-top: 1rem;
}
.readme header, .codebox header { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); font-weight: 600; }
.mdbody { padding: 0.2rem 1.1rem 1rem; }
.mdbody h1, .mdbody h2, .mdbody h3 { margin: 1rem 0 0.4rem; }
table.md { margin: 0.6rem 0 1rem; }
table.md th, table.md td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; }
.side { margin-top: 0.2rem; padding: 0.9rem 1rem; }
.side h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.counts { list-style: none; padding: 0; margin: 0.6rem 0; }
.counts li { padding: 0.28rem 0; }
.counts a { text-decoration: none; }
.fileview { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1rem; align-items: start; }
.treebox h2 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.treelist { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.treelist li { padding: 0.18rem 0.3rem; border-radius: 6px; white-space: nowrap; }
.treelist li a { color: inherit; text-decoration: none; }
.treelist li.active { background: #ddf4ff; }
.treelist li.depth-1 { padding-left: 0.9rem; }
.treelist li.depth-2 { padding-left: 1.6rem; }
.treelist li.depth-3 { padding-left: 2.3rem; }
.treelist li.depth-4 { padding-left: 3rem; }
.treelist li.depth-5 { padding-left: 3.7rem; }
.treelist li.depth-6, .treelist li.depth-7, .treelist li.depth-8 { padding-left: 4.4rem; }
.filename { display: flex; align-items: center; gap: 0.35rem; margin: 0.2rem 0 0.6rem; }
.codebox { margin-top: 0.8rem; overflow: auto; }
table.code { border-collapse: collapse; width: 100%; }
table.code td { border: 0; padding: 0 0.7rem; vertical-align: top; font-family: ui-monospace, monospace; font-size: 0.86rem; line-height: 1.45; }
table.code td.ln { color: #8c959f; text-align: right; width: 1%; user-select: none; background: #f6f8fa; }
table.code td.src { white-space: pre; }
.hl-k { color: #8250df; }
.hl-s { color: #cf222e; }
.hl-c { color: #6e7781; }
.hl-n { color: #0550ae; }
.heat {
  background: white; border: 1px solid var(--line); border-radius: 16px;
  padding: 1rem 1.1rem 0.8rem; box-shadow: var(--shadow); margin: 0.4rem 0 1.1rem;
}
.heat h2 { margin: 0 0 0.55rem; font-size: 1.05rem; }
.heat-scroll { overflow-x: auto; padding: 1.7rem 0.2rem 0.15rem; }
.heat-months, .heat-cols {
  display: grid; grid-auto-flow: column; grid-auto-columns: 11px; column-gap: 3px;
}
.heat-months { margin: 0 0 0.25rem 20px; height: 1rem; font-size: 0.68rem; color: var(--muted); }
.heat-months span { white-space: nowrap; line-height: 1rem; }
.heat-body { display: flex; gap: 4px; }
.heat-dow {
  display: grid; grid-template-rows: repeat(7, 11px); row-gap: 3px;
  width: 16px; font-size: 0.65rem; color: var(--muted); line-height: 11px;
}
.heat-col { display: grid; grid-auto-rows: 11px; row-gap: 3px; }
.sq { width: 11px; height: 11px; border-radius: 2px; display: block; position: relative; }
.sq[title]:hover::after, .sq[title]:focus::after {
  content: attr(title);
  position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%);
  background: #142033; color: white; padding: 0.28rem 0.5rem; border-radius: 6px;
  font-size: 0.78rem; line-height: 1.2; white-space: nowrap; z-index: 5; pointer-events: none;
}
.sq.off { background: transparent; }
.sq.lv0 { background: #e6edf5; }
.sq.lv1 { background: #b9d4f6; }
.sq.lv2 { background: #6eacf0; }
.sq.lv3 { background: #1f6feb; }
.sq.lv4 { background: #0c3f86; }
.heat-foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
  margin-top: 0.7rem; color: var(--muted); font-size: 0.85rem;
}
.heat-total, .heat-legend, .heat-foot .muted { margin: 0; }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.heat-foot .muted { text-align: right; margin-top: 0.2rem; }
.chooser { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.2rem 0 0.4rem; transition: opacity .28s ease, transform .28s ease; }
.chooser.away { opacity: 0; transform: translateY(-10px) scale(.97); pointer-events: none; }
.pick { min-width: 11rem; padding: 1rem 1.3rem; font-size: 1.05rem; }
.sheet { transform-origin: top center; }
.sheet.open { animation: unfold .32s ease; }
.sheet.closing { animation: fold .28s ease forwards; }
@keyframes unfold {
  from { opacity: 0; transform: scaleY(.55); }
  to { opacity: 1; transform: scaleY(1); }
}
@keyframes fold {
  from { opacity: 1; transform: scaleY(1); }
  to { opacity: 0; transform: scaleY(.45); }
}
.flag.ok { color: var(--ok); font-weight: 600; }
.flag.bad { color: var(--bad); font-weight: 600; }
.form-err:empty { display: none; }
.form-err { color: var(--bad); margin: 0.2rem 0; }
.bar { display: flex; gap: .6rem; align-items: center; margin: .4rem 0 .2rem; }
.bar input[type="search"] { flex: 1; }
.sortlabel { color: var(--muted); }
.iconbtn, .copyline button {
  text-decoration: none; background: white; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  min-height: var(--control-h); padding: 0 var(--sp-2); cursor: pointer; font: inherit;
}
.repolist { list-style: none; padding: 0; margin: .4rem 0 1rem; }
.repolist > li { display: flex; align-items: center; gap: .7rem; padding: .75rem .2rem; border-bottom: 1px solid var(--line); }
.reponame { font-weight: 600; text-decoration: none; }
.stars { color: #9a6700; white-space: nowrap; }
.grown { flex: 1; }
.rowmenu { position: relative; }
.rowmenu > summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; padding: .15rem .55rem; background: white; }
.rowmenu > summary::-webkit-details-marker { display: none; }
.rowmenu .menu-panel { position: absolute; right: 0; z-index: 3; min-width: 9rem; }
.rowmenu .menu-panel button, .rowmenu .menu-panel form { width: 100%; }
.rowmenu .menu-panel button { text-align: left; border-radius: 8px; }
img.tile { object-fit: cover; background: #fff; }
@font-face {
  font-family: "Noto Sans Cuneiform";
  src: url("/assets/NotoSansCuneiform-Regular.ttf") format("truetype");
  font-display: swap;
}
html.cunei, html.cunei body, html.cunei button, html.cunei input, html.cunei select, html.cunei textarea {
  font-family: "Noto Sans Cuneiform", "Segoe UI", sans-serif;
}
.applybar {
  position: sticky; top: 0; z-index: 6; display: flex; justify-content: flex-end;
  padding: 0.45rem 0; background: rgba(243, 246, 251, 0.94);
}
.applybar[hidden] { display: none; }
.sugmodal {
  border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem;
  width: min(32rem, 92vw); box-shadow: var(--shadow);
}
.sugmodal::backdrop { background: rgba(20, 32, 51, 0.45); }
.sugmodal h2 { margin: 0 0 0.4rem; }
.diff {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  overflow: auto; user-select: none; margin: 0.4rem 0 1rem;
}
.difffile + .difffile { border-top: 1px solid var(--line); }
.difffile header {
  padding: 0.5rem 0.75rem; background: #f6f8fa; border-bottom: 1px solid var(--line); font-weight: 650;
}
.diffline {
  position: relative; display: grid; grid-template-columns: 16px 3.2rem minmax(0, 1fr);
  font-family: ui-monospace, monospace; font-size: 0.84rem; line-height: 1.5;
}
.diffline code { white-space: pre; padding: 0 0.7rem 0 0.35rem; }
.diffline .ln { color: #8c959f; text-align: right; padding-right: 0.45rem; }
.gutter { background: #eef2f7; cursor: ns-resize; }
.gutter.off { background: transparent; cursor: default; }
.kind-add { background: #e6ffec; }
.kind-del { background: #ffebe9; }
.kind-hunk { color: #8c959f; background: #f6f8fa; }
.diffline.picked { box-shadow: inset 3px 0 0 var(--blue); }
.diffline.picked .gutter { background: #bfdbfe; }
.linenote, .lineform {
  margin: 0.35rem 0.6rem 0.55rem 2.6rem; background: #f6f8fa;
  border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.7rem;
}
.linenote pre.note, ul.clean pre.note {
  background: white; color: var(--ink); border: 1px solid var(--line); margin: 0.35rem 0;
}
label.sugcheck { display: flex; align-items: center; gap: 0.45rem; }
label.sugcheck input { width: auto; }
.bubble {
  position: absolute; left: 18px; top: 0.15rem; z-index: 3;
  width: 28px; height: 28px; padding: 0; border-radius: 8px;
  background: white; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.bubble-icon {
  width: 14px; height: 10px; border: 2px solid var(--blue); border-radius: 7px;
  display: inline-block; position: relative; background: white;
}
.bubble-icon::after {
  content: ""; position: absolute; left: 2px; bottom: -6px;
  border-width: 6px 5px 0 0; border-style: solid;
  border-color: var(--blue) transparent transparent transparent;
}
.pipebar { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; margin: 0.4rem 0 1rem; }
.pipe-filter {
  display: flex; align-items: stretch; flex: 1; max-width: 42rem;
  border: 1px solid var(--line); border-radius: 8px; background: white; overflow: hidden;
}
.pipe-filter input { border: 0; border-radius: 0; width: 100%; }
.pipe-filter button.iconbtn {
  width: 2.6rem; border: 0; border-left: 1px solid var(--line); border-radius: 0;
  background: white; color: var(--ink); padding: 0;
}
.showid { position: relative; }
.showid summary {
  list-style: none; cursor: pointer; background: white; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.75rem;
}
.showid summary::-webkit-details-marker { display: none; }
.showid summary::after { content: "▾"; margin-left: 0.45rem; color: var(--muted); }
.showid form {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 6;
  display: flex; gap: 0.4rem; width: 18rem; padding: 0.6rem;
  background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
}
.showid form input { width: auto; flex: 1; }
table.pipes td { padding: var(--sp-2) var(--sp-3); }
table.pipes .pipeid { font-weight: 700; }
.ellip { display: block; max-width: 28rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; margin-top: 0.28rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.15rem;
  background: #eef2f7; color: var(--ink); text-decoration: none;
  border-radius: 999px; padding: 0.05rem 0.5rem; font-size: 0.78rem;
}
.when { display: flex; align-items: center; gap: 0.3rem; color: var(--muted); font-size: 0.82rem; margin-top: 0.18rem; }
svg.ico { width: 14px; height: 14px; flex: none; }
.avatar.sm { width: 20px; height: 20px; font-size: 0.68rem; }
.status {
  display: inline-flex; align-items: center; gap: 0.32rem;
  border-radius: 999px; padding: 0.12rem 0.55rem 0.12rem 0.28rem;
  font-weight: 650; font-size: 0.84rem; background: #eef2f7; color: var(--ink);
}
.status.passed { background: #e5f6ec; color: #146c43; }
.status.failed { background: #fde8e8; color: #9f2d2d; }
.status.warning { background: #fff4e0; color: #8a5a00; }
.status.running { background: #e7f0ff; color: #1f6feb; }
.status.canceled { background: #f3f0f0; color: #57606a; }
.mark { position: relative; width: 16px; height: 16px; border-radius: 50%; display: inline-block; flex: none; background: #8c959f; }
.status.passed .mark, .stage-dot.passed .mark { background: #1aaa55; }
.status.failed .mark, .stage-dot.failed .mark { background: #dd2b0e; }
.status.warning .mark, .stage-dot.warning .mark { background: #c17d10; }
.status.running .mark, .stage-dot.running .mark { background: #1f75cb; }
.status.canceled .mark, .stage-dot.canceled .mark { background: #8c959f; }
.passed .mark::after {
  content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.failed .mark::before, .failed .mark::after {
  content: ""; position: absolute; left: 3px; top: 7px; width: 10px; height: 2px; background: #fff;
}
.failed .mark::before { transform: rotate(45deg); }
.failed .mark::after { transform: rotate(-45deg); }
.warning .mark::before {
  content: ""; position: absolute; left: 7px; top: 3px; width: 2px; height: 6px; background: #fff;
}
.warning .mark::after {
  content: ""; position: absolute; left: 7px; top: 11px; width: 2px; height: 2px; background: #fff;
}
.skipped .mark::after, .canceled .mark::after {
  content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 2px; background: #fff;
}
.running .mark::after {
  content: ""; position: absolute; left: 4px; top: 4px; width: 8px; height: 8px;
  border: 2px solid #fff; border-radius: 50%; border-right-color: transparent; box-sizing: border-box;
}
.stages { display: flex; align-items: center; }
.mrpipe { display: flex; align-items: center; gap: 0.8rem; margin: 0.2rem 0 1rem; }
.danger-modal {
  border: 6px solid #a31212;
  background: #fde8e8;
  color: #6d1212;
  width: min(92vw, 52rem);
  padding: 2.2rem 2rem;
  border-radius: 16px;
}
.danger-modal::backdrop { background: rgba(80, 8, 8, 0.55); }
.danger-modal p { font-size: 1.7rem; line-height: 1.45; margin: 0 0 1.2rem; }
.danger-modal [data-transfer-submit], .danger-modal [data-tag-submit] { background: #a31212; color: #fff; }
.danger-modal [data-transfer-submit]:disabled { opacity: 0.45; }
.stage { position: relative; display: flex; align-items: center; }
.stage + .stage::before { content: ""; width: 14px; height: 2px; background: #c5d0dc; margin: 0 2px; }
button.stage-dot {
  width: 26px; height: 26px; min-height: 0; padding: 0; border: 0; border-radius: 50%;
  background: transparent; display: grid; place-items: center; position: relative;
}
button.stage-dot:hover::after, button.stage-dot:focus-visible::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #24292f; color: white; font-size: 0.75rem; font-weight: 600;
  padding: 0.28rem 0.5rem; border-radius: 6px; white-space: nowrap; z-index: 7;
}
.stage.open button.stage-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1f75cb; }
.stage-pop {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 8; min-width: 220px;
  background: white; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); padding: 0.7rem 0.85rem;
}
.stage-pop[hidden] { display: none; }
.stage-pop ul { list-style: none; margin: 0.35rem 0 0; padding: 0; }
.stage-pop a, .related a { display: flex; align-items: center; gap: 0.4rem; text-decoration: none; padding: 0.22rem 0; color: var(--ink); }
.stage-dot.sm { width: 16px; height: 16px; display: inline-grid; place-items: center; }
.stage-dot.sm .mark { width: 14px; height: 14px; }
.stage-dot.sm.passed .mark::after { left: 4px; top: 2px; width: 3px; height: 6px; }
.jobhead { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.joblayout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1rem; align-items: start; }
.console-wrap { border: 1px solid #2a2a2a; border-radius: 8px; overflow: hidden; background: #1e1e1e; }
.conbar {
  display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; flex-wrap: wrap;
  background: #f6f8fa; padding: 0.45rem 0.55rem; border-bottom: 1px solid var(--line);
}
.conbar .pipe-filter { max-width: none; flex: 1; min-width: 12rem; }
.contools { display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; }
.contools .ghost, .contools a.ghost { padding: 0.3rem 0.55rem; background: white; }
.console {
  color: #e6edf3; font-family: ui-monospace, monospace; font-size: 0.82rem;
  max-height: 68vh; overflow: auto; padding: 0.35rem 0 0.8rem;
}
.console.wrap code { white-space: pre-wrap; word-break: break-word; }
.console code { white-space: pre; }
.ansi-bold { font-weight: 700; }
.ansi-dim { opacity: 0.65; }
.ansi-italic { font-style: italic; }
.ansi-underline { text-decoration: underline; }
.ansi-fg-black { color: #6e7681; }
.ansi-fg-red { color: #ff7b72; }
.ansi-fg-green { color: #3fb950; }
.ansi-fg-yellow { color: #d29922; }
.ansi-fg-blue { color: #79c0ff; }
.ansi-fg-magenta { color: #d2a8ff; }
.ansi-fg-cyan { color: #56d4dd; }
.ansi-fg-white { color: #f0f6fc; }
.ansi-fg-bright-black { color: #8b949e; }
.ansi-fg-bright-red { color: #ffa198; }
.ansi-fg-bright-green { color: #56d364; }
.ansi-fg-bright-yellow { color: #e3b341; }
.ansi-fg-bright-blue { color: #a5d6ff; }
.ansi-fg-bright-magenta { color: #e2c5ff; }
.ansi-fg-bright-cyan { color: #7ee7ef; }
.ansi-fg-bright-white { color: #ffffff; }
.ansi-bg-black { background: #1c2128; }
.ansi-bg-red { background: #6e2b29; }
.ansi-bg-green { background: #1f4d32; }
.ansi-bg-yellow { background: #5c4a1f; }
.ansi-bg-blue { background: #1f3b5c; }
.ansi-bg-magenta { background: #4a2d5c; }
.ansi-bg-cyan { background: #1c4a4e; }
.ansi-bg-white { background: #d0d7de; color: #1c2128; }
.ansi-bg-bright-black { background: #2d333b; }
.ansi-bg-bright-red { background: #8a3834; }
.ansi-bg-bright-green { background: #2a6b3c; }
.ansi-bg-bright-yellow { background: #7a641f; }
.ansi-bg-bright-blue { background: #2a5580; }
.ansi-bg-bright-magenta { background: #684080; }
.ansi-bg-bright-cyan { background: #2a666c; }
.ansi-bg-bright-white { background: #f0f6fc; color: #1c2128; }
.lognote { margin: 0.2rem 0.8rem 0.45rem; color: #8b949e; font-family: inherit; }
.logline, .logsec ol li {
  display: grid; grid-template-columns: 3rem 5.4rem minmax(0, 1fr);
  gap: 0.45rem; padding: 0 0.7rem; line-height: 1.45;
}
.logsec ol { list-style: none; margin: 0; padding: 0; display: none; }
.logsec.open ol { display: block; }
.ln, .ts { color: #8b949e; }
.ln { text-align: right; }
.logline.hit, .logsec li.hit { background: #3d3416; }
.logline.hit.on, .logsec li.hit.on { background: #6b5710; }
button.section-toggle {
  width: 100%; min-height: 0; background: transparent; color: #9ecbff; border: 0; border-radius: 0;
  display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.7rem; text-align: left; font-weight: 650;
}
.section-toggle .pill { margin-left: auto; background: #2d333b; color: #d0d7de; border-color: #444c56; }
.chev {
  width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor; display: inline-block;
}
.logsec.open .chev { transform: rotate(90deg); }
.console-wrap:fullscreen { display: flex; flex-direction: column; background: #111; border-radius: 0; }
.console-wrap:fullscreen .console { max-height: none; flex: 1; }
.console-wrap.full { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; border-radius: 0; }
.console-wrap.full .console { max-height: none; flex: 1; }
.jobside {
  background: white; border: 1px solid var(--line); border-radius: 12px; padding: 0.85rem 1rem;
}
.jobside dt { color: var(--muted); font-size: 0.78rem; margin-top: 0.7rem; }
.jobside dd { margin: 0.12rem 0 0; }
.jobside h2 { font-size: 0.95rem; margin: 0.9rem 0 0.3rem; }
.related { list-style: none; margin: 0; padding: 0; }
.related li { display: flex; align-items: center; gap: 0.3rem; }
.related .arrow { width: 1rem; color: var(--muted); }
.editorhead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.7rem; }
.editorhead h2 { margin: 0; font-size: 1.15rem; }
.editorhead .status { margin: 0; }
.ciedit {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white;
}
.ci-gutter {
  overflow: hidden; background: #f6f8fa; color: #8c959f; text-align: right;
  font-family: ui-monospace, monospace; font-size: 0.86rem; line-height: 1.45;
  padding: 0.55rem 0.45rem; user-select: none;
}
.ci-gutter span { display: block; }
.ci-gutter span.bad { background: #fde8e8; color: var(--bad); font-weight: 700; }
.ci-stage { position: relative; height: 24rem; }
.ci-back, .ciedit textarea {
  font-family: ui-monospace, monospace; font-size: 0.86rem; line-height: 1.45;
  padding: 0.55rem 0.7rem; margin: 0; white-space: pre; tab-size: 2;
}
.ci-back { position: absolute; inset: 0; overflow: hidden; color: var(--ink); pointer-events: none; }
.codeline { min-height: 1.45em; }
.codeline.bad { background: #fff5f5; }
.ciedit textarea {
  position: relative; width: 100%; height: 100%; border: 0; border-radius: 0;
  background: transparent; color: transparent; caret-color: var(--ink); resize: none; overflow: auto;
}
.ciedit textarea::selection { background: rgba(31, 111, 235, 0.25); }
.ci-issues { list-style: none; padding: 0; margin: 0.7rem 0 0; }
.ci-issues li.bad { color: var(--bad); }
.ci-issues li.warn { color: #8a5a00; }
.hero h1 { font-size: 32px; }
.mdbody h1 { font-size: 24px; }
.sidecontext .tile { width: 32px; height: 32px; font-size: 1rem; }
.filename { font-size: 16px; font-weight: 600; }
@media (max-width: 960px) {
  .frame.with-side { flex-direction: column; align-items: stretch; }
  .sidenav, .content { width: 100%; max-width: 100%; min-width: 0; }
  .sidenav {
    position: sticky; top: var(--top-h); height: auto;
    border-right: 0; border-bottom: 1px solid var(--line); z-index: 20;
  }
  .sidenav-links {
    flex-direction: row; overflow-x: auto; min-width: 0; padding: 0 var(--sp-2);
    scrollbar-width: none;
  }
  .sidenav-links::-webkit-scrollbar { display: none; }
  .sidenav-links a {
    flex: none; white-space: nowrap; margin: 0; border-radius: 0;
    box-shadow: inset 0 -2px 0 transparent; padding: var(--sp-2) var(--sp-3);
  }
  .sidenav-links a.on { background: transparent; font-weight: 400; box-shadow: inset 0 -2px 0 var(--blue); }
}
@media (max-width: 800px) {
  .proj, .fileview, .joblayout { grid-template-columns: minmax(0, 1fr); }
  .proj > *, .fileview > *, .toolbar, .commitbar, .hscroll { min-width: 0; max-width: 100%; }
  .heat-foot { flex-direction: column; align-items: flex-start; }
  .heat-legend, .heat-foot .muted { justify-content: flex-start; text-align: left; }
  .repolist > li { flex-wrap: wrap; }
  .pagehead { align-items: flex-start; }
  .pageacts { flex-wrap: wrap; justify-content: flex-end; }
}
