:root {
  --fondo: #000000;
  --barra: #0d0d10;
  --barra-alta: #16161a;
  --bordo: rgba(255, 255, 255, 0.075);
  --linea: rgba(255, 255, 255, 0.09);
  --testo: #efeff2;
  --spento: #8b8b95;
  --accento: #c8f25a;
  --accento-scuro: #8fbf2a;
  --suggerimento: #1b1b20;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Geist Variable", "Geist", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.stage {
  position: relative;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.fit { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); transform-origin: 50% 50%; }
.sb-wrap {
  position: relative;
  width: 262px;
}

/* ---- the bar ---- */
.sb {
  position: relative;
  width: 248px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(200, 242, 90, 0.045), transparent 60%),
    linear-gradient(180deg, var(--barra-alta), var(--barra) 46%);
  box-shadow:
    inset 0 0 0 1px var(--bordo),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.02),
    0 30px 60px -24px rgba(200, 242, 90, 0.06);
  --mx: 30%;
  --my: 0%;
  --luce: 0;
}
/* the edge picks up light near the pointer */
.sb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(180px 180px at var(--mx) var(--my), rgba(255, 255, 255, 0.32), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: var(--luce);
  pointer-events: none;
}

.sb__head {
  height: 60px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  flex: none;
}
.sb__brand {
  display: flex;
  align-items: center;
  height: 40px;
  padding-left: 8px;
  border-radius: 10px;
  outline: none;
}
.sb__tile {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(155deg, #e4ff97, var(--accento) 45%, var(--accento-scuro));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 4px 14px -4px rgba(200, 242, 90, 0.45);
}
.sb__tile svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sb__tile line { stroke: #10130a; stroke-width: 2.7; stroke-linecap: round; fill: none; }
.sb__brand:focus-visible .sb__tile { outline: 2px solid var(--testo); outline-offset: 3px; }

.sb__body {
  position: relative;
  padding: 2px 10px 12px;
  flex: none;
}
.sb__group + .sb__group { margin-top: 10px; }
.sb__title {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
  padding-left: 14px;
}
.sb__rule {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--linea) 20%, rgba(255, 255, 255, 0.16) 50%, var(--linea) 80%, transparent);
  transform: scaleX(0);
}

/* the pill under the page you are on: moved by a spring in script.js */
.sb__pill {
  position: absolute;
  left: 10px;
  top: 0;
  height: 38px;
  width: 228px;
  border-radius: 10px;
  background:
    radial-gradient(70% 140% at 0% 50%, rgba(200, 242, 90, 0.085), transparent 70%),
    rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 6px 16px -8px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.sb__item {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
  padding-left: 14px;
  border-radius: 10px;
  color: var(--spento);
  font-size: 13.5px;
  font-weight: 470;
  letter-spacing: -0.005em;
  outline: none;
  transition: color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.sb__list li + li { margin-top: 2px; }
.sb__item[aria-current="page"] { color: var(--testo); }
.sb__item:focus-visible { box-shadow: inset 0 0 0 1.5px rgba(239, 239, 242, 0.5); }
@media (hover: hover) {
  .sb__item:hover { color: var(--testo); }
}

.sb__ico {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}
.sb__ico svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.sb__item[aria-current="page"] .sb__ico { color: var(--accento); }
/* the little flash when the tape snaps in */
.sb__ico::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 8px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.22), transparent);
  opacity: var(--lampo, 0);
  pointer-events: none;
}

/* a name: the letters slide left and vanish at the icon's edge */
.reel {
  position: relative;
  display: block;
  white-space: nowrap;
  padding-left: 12px;
  clip-path: inset(-10px -600px -10px 0);
  pointer-events: none;
  flex: 0 0 auto;
}
.reel .l { display: inline-block; white-space: pre; will-change: transform; }
.reel--brand { padding-left: 11px; font-size: 16px; font-weight: 640; letter-spacing: -0.02em; color: var(--testo); }
.reel--title {
  padding-left: 0;
  font-size: 10.5px;
  font-weight: 560;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(139, 139, 149, 0.72);
}

.sb__badge {
  position: absolute;
  left: 25px;
  top: 2px;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  color: #10130a;
  background: linear-gradient(180deg, #dcff86, var(--accento));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 2px var(--barra);
  transform-origin: 30% 50%;
}

.sb__foot {
  flex: none;
  margin: 0 10px;
  padding: 8px 0 10px;
  border-top: 1px solid var(--linea);
}
.sb__user {
  display: flex;
  align-items: center;
  height: 48px;
  padding-left: 10px;
  border-radius: 10px;
  outline: none;
}
.sb__user:focus-visible { box-shadow: inset 0 0 0 1.5px rgba(239, 239, 242, 0.5); }
.sb__avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 640;
  letter-spacing: 0.02em;
  color: var(--testo);
  background: linear-gradient(150deg, #3a3a44, #1c1c22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.sb__who { display: flex; flex-direction: column; gap: 1px; }
.sb__who .reel { padding-left: 10px; }
.reel--name { font-size: 13px; font-weight: 560; color: var(--testo); }
.reel--role { font-size: 11.5px; color: var(--spento); }

/* ---- the button on the edge ---- */
.sb__toggle {
  position: absolute;
  top: 18px;
  left: 236px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--spento);
  background: linear-gradient(180deg, #202026, #141418);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 3px var(--fondo),
    0 4px 10px rgba(0, 0, 0, 0.6);
  transition: color 0.2s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.sb__toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.sb__toggle:focus-visible { color: var(--testo); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 0 3px var(--fondo), 0 0 0 4.5px rgba(239, 239, 242, 0.6); }
@media (hover: hover) {
  .sb__toggle:hover { color: var(--testo); }
}

/* ---- the tooltip ---- */
.sb__tip {
  position: absolute;
  left: 80px;
  top: 0;
  height: 32px;
  padding: 0 6px 0 11px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #24242a, var(--suggerimento));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 10px 24px -8px rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transform-origin: 0% 50%;
  white-space: nowrap;
  overflow: hidden;
}
.sb__tipin { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 520; color: var(--testo); }
.sb__keys { display: flex; gap: 3px; }
.sb__keys kbd {
  min-width: 18px;
  height: 19px;
  padding: 0 4px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 10.5px;
  font-weight: 560;
  color: var(--spento);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

/* ---- the autopilot's drawn pointer ---- */
.ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  margin: -3px 0 0 -4px;
  fill: #f4f4f6;
  stroke: #000;
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}
