:root {
  --fondo: #fafafa;
  --carta: #ffffff;
  --inchiostro: #0a0a0a;
  --grigio: #71717a;
  --grigio-chiaro: #a1a1aa;
  --linea: rgba(10, 10, 10, 0.08);
  --vivo: #22c55e;
}

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

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.card {
  width: min(400px, 100%);
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: 20px;
  padding: clamp(14px, 4.2vmin, 20px);
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 18px 40px -18px rgba(10, 10, 10, 0.18);
}

.card__head { display: flex; gap: 11px; align-items: center; }
.card__logo {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--inchiostro);
}
.card__logo svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.card__name { min-width: 0; flex: 1; }
.card__title { font-size: 15px; font-weight: 640; letter-spacing: -0.01em; }
.card__sub { font-size: 12px; color: var(--grigio); margin-top: 1px; }
.card__env {
  font-size: 11.5px; color: var(--grigio);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.commit {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 14px -8px 14px;
  padding: 10px 8px;
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
  border-radius: 0;
  outline: none;
  transition: background-color 0.25s ease, border-radius 0.25s ease;
}
.commit:focus-visible { background: #f4f4f5; border-radius: 10px; }
.branch {
  flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px 0 6px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 560;
  background: #fff;
}
.branch svg { width: 13px; height: 13px; fill: none; stroke: var(--inchiostro); stroke-width: 1.6; stroke-linecap: round; }
.commit__body { min-width: 0; }
.commit__msg {
  font-size: 13px; font-weight: 540;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 22px;
}
.commit__hash {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; font-weight: 500;
  color: var(--grigio);
}
.commit__who {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--grigio);
  margin-top: 2px;
}
.who {
  width: 16px; height: 16px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: #e4e4e7; color: #3f3f46;
  font-size: 7.5px; font-weight: 700; letter-spacing: 0.02em;
}

.act { position: relative; height: 54px; }

.deploy {
  position: absolute; left: 50%; top: 5px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--inchiostro);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 1px rgba(10, 10, 10, 0.18), 0 8px 18px -8px rgba(10, 10, 10, 0.5);
  -webkit-tap-highlight-color: transparent;
}
.deploy:focus-visible { outline: 2px solid var(--inchiostro); outline-offset: 3px; }

.deploy__face {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.deploy__face--idle { justify-content: center; }
.deploy__face--busy, .deploy__face--live { padding: 0 16px; opacity: 0; visibility: hidden; }

.ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.ico--ok { stroke: var(--vivo); stroke-width: 2.2; width: 18px; height: 18px; }

.stepicon { position: relative; width: 17px; height: 17px; flex: none; }
.stepicon .ico { position: absolute; inset: 0; opacity: 0; }

.word {
  position: relative;
  height: 1.3em; line-height: 1.3em;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.word__in { position: absolute; left: 0; top: 0; }

.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 520;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.rail {
  position: absolute; left: 16px; right: 16px; bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.rail__fill {
  position: absolute; inset: 0;
  background: #fff;
  border-radius: 2px;
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.live__word { flex: none; }
.url {
  position: relative;
  flex: 1; min-width: 0;
  overflow: hidden;
  height: 1.3em; line-height: 1.3em;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 480;
  font-size: 13px;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
          mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.url__in { position: absolute; left: 0; top: 0; white-space: nowrap; }
.visit {
  flex: none;
  display: inline-flex; align-items: center; gap: 3px;
  height: 28px; padding: 0 9px 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12.5px; font-weight: 600;
}
.visit svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.foot {
  margin-top: 6px;
  text-align: center;
  font-size: 11.5px;
  color: var(--grigio-chiaro);
}
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11px; }

.ghost {
  position: fixed; left: 0; top: 0;
  width: 22px; height: 22px;
  fill: #111113; stroke: #ffffff; stroke-width: 1.4; stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  z-index: 5;
}

@media (hover: hover) {
  .commit:hover { background: #f4f4f5; border-radius: 10px; }
  .deploy:hover { box-shadow: 0 1px 1px rgba(10, 10, 10, 0.18), 0 12px 24px -10px rgba(10, 10, 10, 0.55); }
  .visit:hover { background: rgba(255, 255, 255, 0.2); }
}

@media (max-width: 380px) {
  .card__env { display: none; }
  .deploy__face--busy, .deploy__face--live { padding: 0 13px; gap: 7px; }
  .rail { left: 13px; right: 13px; }
}

@media (min-width: 900px) and (min-height: 640px) {
  .card { transform: scale(1.18); }
}
