/* The commit history with branches that split and merge on scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #ffffff;
  --carta: #ffffff;
  --inchiostro: #17161a;
  --secondario: #77736b;
  --spento: #b9b5ad;
  --bordo: rgba(23, 22, 26, 0.09);
  --riga: rgba(23, 22, 26, 0.06);
  --accento: #2d5bff;
  --accento-tenue: rgba(45, 91, 255, 0.07);
  --ramo-tre: #9a958c;
  --fascia: rgba(23, 22, 26, 0.035);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--fondo); }
body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.corsa { position: relative; height: 340vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.2vh, 20px);
  padding: clamp(10px, 3vh, 36px) clamp(12px, 4vw, 48px);
  overflow: hidden;
}

.titolo {
  font-size: clamp(17px, min(3.4vw, 4.6vh), 30px);
  font-weight: 620;
  font-stretch: 92%;
  letter-spacing: -0.02em;
  color: var(--spento);
  transition: color 0.5s ease;
  text-align: center;
  line-height: 1.1;
}
.titolo.acceso { color: var(--inchiostro); }

.pannello {
  position: relative;
  width: min(680px, 100%);
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 22, 26, 0.04), 0 18px 48px -18px rgba(23, 22, 26, 0.16);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.testa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 clamp(10px, 2.4vw, 18px);
  height: var(--alta-testa, 46px);
  border-bottom: 1px solid var(--riga);
  font-size: var(--corpo-testo, 13px);
  white-space: nowrap;
}
.repo { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-weight: 560; }
.repo svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--secondario); stroke-width: 1.2; stroke-linejoin: round; }
.repo__nome { overflow: hidden; text-overflow: ellipsis; }
.repo__org { color: var(--secondario); font-weight: 450; }
.testa__destra { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.ramo {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 7px 0 7px;
  border: 1px solid var(--bordo); border-radius: 7px;
  font-family: 'Geist Mono Variable', 'Geist Mono', ui-monospace, monospace;
  font-size: 0.88em;
}
.ramo svg { width: 13px; height: 13px; fill: none; stroke: var(--inchiostro); stroke-width: 1.2; }
.ramo .ramo__giu { width: 11px; height: 11px; stroke: var(--secondario); }
.conto { color: var(--secondario); }
.conto__n { display: inline-block; color: var(--inchiostro); font-weight: 600; }

.corpo { position: relative; flex: none; height: var(--alta-corpo, 400px); }
.grafo { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 2; }
.grafo path { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.grafo .nodo { fill: var(--carta); stroke-width: 1.6; }
.grafo .alone { fill: none; stroke-width: 1.2; }

.fascia {
  position: absolute; left: 6px; right: 6px; top: 0;
  height: var(--alta-riga, 38px);
  border-radius: 9px;
  background: var(--fascia);
  opacity: 0;
  z-index: 0;
  will-change: transform;
}

.righe { position: absolute; inset: 0; list-style: none; z-index: 1; }
.riga {
  position: absolute; left: 0; right: 0;
  height: var(--alta-riga, 38px);
  display: flex; align-items: center; gap: 10px;
  padding-left: var(--gronda, 64px);
  padding-right: calc(clamp(10px, 2.4vw, 18px) + var(--posto-head, 52px));
  font-size: var(--corpo-testo, 13px);
  white-space: nowrap;
}
.riga__vuoto {
  position: absolute; left: var(--gronda, 64px); top: 50%;
  height: 0.62em; margin-top: -0.31em;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(23, 22, 26, 0.055), rgba(23, 22, 26, 0.03));
  pointer-events: none;
}
.riga__dentro { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; will-change: transform, opacity; }
.riga__msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 520; }
.chip {
  flex: none;
  display: inline-flex; align-items: center;
  height: 1.55em; padding: 0 0.5em;
  border-radius: 6px;
  font-family: 'Geist Mono Variable', 'Geist Mono', ui-monospace, monospace;
  font-size: 0.82em;
  border: 1px solid currentColor;
}
.chip--ramo1 { color: var(--accento); background: var(--accento-tenue); border-color: rgba(45, 91, 255, 0.28); }
.chip--ramo2 { color: #6f6a61; background: rgba(23, 22, 26, 0.035); border-color: rgba(23, 22, 26, 0.16); }
.chip--tag { color: var(--inchiostro); border-color: rgba(23, 22, 26, 0.22); gap: 4px; will-change: transform; }
.chip--tag svg { width: 0.95em; height: 0.95em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.riga__chi { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--secondario); margin-left: auto; }
.avatar {
  width: 1.55em; height: 1.55em; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 0.78em; font-weight: 640; color: var(--inchiostro);
  background: #eceae6;
  box-shadow: inset 0 0 0 1px rgba(23, 22, 26, 0.06);
}
.avatar--b { background: #e3e9ff; color: #2443b8; }
.avatar--c { background: #f1ebe0; color: #6f5a35; }
.riga__hash {
  flex: none;
  position: relative;
  font-family: 'Geist Mono Variable', 'Geist Mono', ui-monospace, monospace;
  font-size: 0.86em;
  color: var(--secondario);
  padding: 2px 5px 2px 21px; margin: 0 -5px 0 -6px;
  border-radius: 5px;
  border: 0; background: none; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.riga__hash svg {
  position: absolute; left: 5px; top: 50%;
  width: 12px; height: 12px; margin-top: -6px;
  fill: none; stroke: var(--secondario); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transform: translateX(3px);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(.19, 1, .22, 1);
}
.riga__hash .copia__fatto { stroke: var(--accento); stroke-dasharray: 12; stroke-dashoffset: 12; }
.riga__hash.copiato .copia__foglio { opacity: 0; }
.riga__hash.copiato .copia__fatto { stroke-dashoffset: 0; transition: stroke-dashoffset 0.35s cubic-bezier(.19, 1, .22, 1); }
.riga__hash:focus-visible { outline: 2px solid var(--accento); outline-offset: 1px; }
.riga__hash.copiato svg { opacity: 1; transform: none; }
.riga__hash:active { transform: translateY(1px); }
@media (hover: hover) {
  .riga:hover .riga__hash svg { opacity: 1; transform: none; }
  .riga__hash:hover { background: rgba(23, 22, 26, 0.05); color: var(--inchiostro); }
}
.riga__quando { flex: none; width: 2.6em; text-align: right; color: var(--secondario); font-size: 0.92em; }

.head {
  position: absolute; right: clamp(10px, 2.4vw, 18px); top: 0;
  height: 1.6em;
  display: inline-flex; align-items: center;
  padding: 0 0.55em;
  border-radius: 999px;
  background: var(--inchiostro); color: #fff;
  font-family: 'Geist Mono Variable', 'Geist Mono', ui-monospace, monospace;
  font-size: calc(var(--corpo-testo, 13px) * 0.78);
  letter-spacing: 0.02em;
  opacity: 0;
  z-index: 3;
  will-change: transform;
}

.piede {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: var(--alta-piede, 40px);
  padding: 0 clamp(10px, 2.4vw, 18px);
  border-top: 1px solid var(--riga);
  font-size: calc(var(--corpo-testo, 13px) * 0.92);
  color: var(--secondario);
  white-space: nowrap;
}
.piede > span { opacity: 0; display: inline-flex; align-items: center; gap: 6px; }
.piede svg { width: 14px; height: 14px; fill: none; stroke: var(--accento); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.piede__spunta { stroke-dasharray: 12; stroke-dashoffset: 12; }
.piede__uscita { color: var(--inchiostro); font-weight: 560; }

.fine { padding: 28px 16px 36px; text-align: center; font-size: 12px; color: var(--secondario); }

/* narrow cards: the author and the time step aside, the graph and the hash stay */
.stretto .riga__chi, .stretto .riga__quando { display: none; }
.stretto .piede__uscita { display: none; }
.strettissimo .repo__org { display: none; }
.strettissimo .chip--ramo1, .strettissimo .chip--ramo2 { display: none; }
