:root {
  --bg: #000000;
  --card: #141416;
  --ink: #f4f4f6;
  --soft: rgba(244, 244, 246, 0.56);
  --line: rgba(244, 244, 246, 0.12);
  --accent: #b18cff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.rb { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: min(348px, 100%); padding: 16px 16px 16px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 50px -30px rgba(0, 0, 0, 0.9); }
.rb__head { display: grid; gap: 1px; padding: 0 2px; }
.rb__head strong { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 18px; font-weight: 700; }
.rb__clip { display: block; height: 16px; line-height: 16px; overflow: hidden; white-space: nowrap; }
.rb__clip span { display: block; overflow: hidden; text-overflow: ellipsis; }
.rb__head .rb__clip { font-size: 12px; font-weight: 620; color: var(--soft); }

/* the graph: main runs along the bottom, the branch above it; every circle, hash and thread is placed by the script */
.rb__graph { border-radius: 16px; background: rgba(0, 0, 0, 0.36); box-shadow: inset 0 0 0 1px rgba(244, 244, 246, 0.06); }
.rb__graph svg { display: block; width: 100%; height: auto; overflow: visible; }
.rb__main { stroke: rgba(244, 244, 246, 0.4); stroke-width: 2; stroke-linecap: round; }
.rb__link { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rb__c { fill: var(--card); stroke: rgba(244, 244, 246, 0.75); stroke-width: 2; cursor: pointer; outline: none; }
.rb__c--feat { fill: var(--accent); stroke: var(--accent); }
.rb__c:focus-visible { stroke: #ffffff; stroke-width: 3; }
.rb__old { fill: none; stroke: color-mix(in srgb, var(--accent) 70%, transparent); stroke-width: 1.300; stroke-dasharray: 2.400 2.800; opacity: 0; }
.rb__h { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: 9.500px; font-weight: 600; fill: rgba(244, 244, 246, 0.5); text-anchor: middle; pointer-events: none; }
.rb__h--feat { fill: color-mix(in srgb, var(--accent) 80%, #ffffff); }
.rb__tag rect { fill: rgba(244, 244, 246, 0.14); }
.rb__tag text { font-size: 9.500px; font-weight: 700; fill: var(--ink); text-anchor: middle; pointer-events: none; }
.rb__tag--feat rect { fill: color-mix(in srgb, var(--accent) 30%, transparent); }

.rb__info { padding: 0 2px; }
.rb__info .rb__clip { font-size: 12.500px; font-weight: 620; color: var(--soft); }
.rb__btn { display: grid; place-items: center; height: 44px; border-radius: 22px; background: var(--ink); color: #0c0c0e; font-size: 14px; font-weight: 730; white-space: nowrap; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 14px 20px -12px rgba(244, 244, 246, 0.3); transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; }
.rb__btn.is-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.500px rgba(244, 244, 246, 0.24); }
.rb__btn:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #ffffff; stroke: #0c0c0e; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); z-index: 6; }

@media (max-width: 350px) { .rb { padding: 14px 13px 14px; } .rb__info .rb__clip { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .rb__btn { transition: none; } }
