:root {
  /* the palette of GitVerse: ink, secondary text, lines, chips, the indigo accent */
  --bg: #ffffff; --panel: #ffffff; --subtle: #f9fafa; --ink: #363b49; --muted: #667185; --line: #d1d9e0;
  --accent: #5858db; --accent-ink: #ffffff; --ok: #1a7f37; --ok-bg: #dafbe1; --err: #cf222e; --err-bg: #fff5f5;
  --warn: #9a6700; --warn-bg: #fff8c5; --code: #eaeef1;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --panel: #16191f; --subtle: #1b1f26; --ink: #e3e6ec; --muted: #9aa3b2; --line: #2c323c;
    --accent: #8b8bff; --accent-ink: #0b0c1a; --ok: #57d27c; --ok-bg: #12301f; --err: #ff7b72; --err-bg: #3a1614;
    --warn: #e3b341; --warn-bg: #33270f; --code: #232833; color-scheme: dark; }
}
* { box-sizing: border-box; }
:root { --head-h: 57px; }
body.with-tabs { --head-h: 102px; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; font-size: 17px; }
.brand span { font-weight: 400; color: var(--muted); }
.host { color: var(--muted); font-size: 13px; }
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; max-width: 1280px;
  margin: 0 auto; padding: 24px 40px 120px; }
.side { position: sticky; top: calc(var(--head-h) + 16px); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.side a { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; padding: 6px 10px;
  border-radius: 8px; font-size: 14px; }
.side a:hover { background: var(--code); }
.side a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.side a[aria-current="true"] { background: var(--code); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.side a .dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.side a.ok .dot { background: var(--ok); }
.side a.bad .dot { background: var(--err); }
.layout > main { min-width: 0; }  /* a long command or URL never widens the page */
.page-head { margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.page-head p { margin: 4px 0 0; font-size: 14px; }
/* a section: a box with a header strip, as GitVerse draws repository settings */
section.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0 20px 20px;
  margin-bottom: 20px; scroll-margin-top: calc(var(--head-h) + 16px); overflow: hidden; }
section.card > h2 { margin: 0 -20px 16px; padding: 12px 20px; background: var(--subtle); border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 600; }
section.card > p.lead { margin: -4px 0 16px; color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.grid .full { grid-column: 1 / -1; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 500; }
label.field .help { font-weight: 400; color: var(--muted); font-size: 12.5px; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; width: 100%; }
textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; min-height: 64px; resize: vertical; }
input.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
button { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 8px; padding: 7px 12px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 500; }
button.primary:hover { filter: brightness(.94); }
button.danger { color: var(--err); }
button:disabled { opacity: .55; cursor: progress; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.row.tight { margin: 0; }
.repo { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 12px; background: var(--bg); }
.repo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.repo-head strong { font-size: 15px; }
.msg { margin-top: 10px; padding: 8px 12px; border-radius: 6px; font-size: 13.5px; white-space: pre-wrap; }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.err { background: var(--err-bg); color: var(--err); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.msg:empty { display: none; }
pre.key { background: var(--code); padding: 10px 12px; border-radius: 6px; white-space: pre-wrap; word-break: break-all;
  font-size: 12.5px; margin: 6px 0; }
.muted { color: var(--muted); }
details.help-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px;
  background: var(--bg); }
details.help-box summary { cursor: pointer; font-weight: 600; }
details.help-box ol { margin: 10px 0 6px; padding-left: 22px; }
details.help-box li { margin-bottom: 4px; }
details.help-box p { margin: 6px 0 0; font-size: 13.5px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; }
.checks input { width: auto; }
table.res { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 10px; }
table.res td, table.res th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--subtle); border-top: 1px solid var(--line);
  padding: 10px 40px; display: flex; justify-content: space-between; align-items: center; gap: 12px; z-index: 6; }
.bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.done { text-align: center; padding: 60px 20px; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--code); padding: 1px 5px; border-radius: 4px; font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 12px 16px 170px; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .grid { grid-template-columns: 1fr; }
  .bar { flex-direction: column; align-items: stretch; padding: 10px 16px; }
}

/* shared with the console (console.css): helpers and the two-row header — the path, then the tabs */
.ic { width: 16px; height: 16px; flex: none; }
.grow { flex: 1 1 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* ------------------------------------------------------------------ header: the path, then the tabs */
.top.gv { display: block; padding: 0; background: var(--subtle); border-bottom: 1px solid var(--line); }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 56px; padding: 6px 40px; }
.top.gv .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font-size: 15px; font-weight: 400; }
.top.gv .brand .mark, .mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 400; }
.mark .mk { width: 16px; height: 16px; stroke-width: 2.4; }
.crumb-sep { color: var(--muted); }
.crumb { font-weight: 600; overflow-wrap: anywhere; }
.search { display: flex; align-items: center; gap: 8px; flex: 0 1 300px; min-width: 200px; height: 36px; padding: 0 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.search:focus-within { outline: 2px solid var(--accent); border-color: transparent; }
.search input { min-width: 0; border: 0; background: transparent; padding: 0; height: 34px; }
.search input:focus { outline: none; }
.search kbd { padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; font-family: var(--mono); font-size: 11px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 32px; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 10px 12px; color: var(--ink);
  text-decoration: none; font-size: 15px; font-weight: 500; border-radius: 0; }
.tabs a:hover { box-shadow: inset 0 -2px 0 var(--line); }
.tabs a.active { box-shadow: inset 0 -2px 0 var(--accent); }
.tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tabs .ic { color: var(--muted); }
.alert-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--err); }

.top.gv .host { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  .top.gv { position: static; }
  .topbar { padding: 8px 16px; }
  .tabs { padding: 0 8px; }
  .layout { padding: 12px 16px 170px; }
}
