:root {
  --fondo: #fafafa;
  --carta: #ffffff;
  --bordo: rgba(17, 17, 19, 0.08);
  --riga: #f4f4f5;
  --spento: #c4c4cc;
  --binario: #e4e4e7;
  --testo: #18181b;
  --testo-2: #71717a;
  --testo-3: #a1a1aa;
  --pieno: #2b2b30;
  --accento: #f2a900;
  --accento-chiaro: #fff4d6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3.5vmin, 40px);
}

.card {
  width: min(380px, 100%);
  padding: clamp(10px, 2.8vmin, 18px);
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(17, 17, 19, 0.04), 0 22px 46px -26px rgba(17, 17, 19, 0.32);
}

/* the breadcrumb, with the small battery of the status bar on the right */
.top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--testo-3);
  padding: 0 2px clamp(6px, 2vmin, 12px);
}
.top__dev { color: var(--testo-2); font-weight: 550; }
.top__sep { width: 7px; height: 10px; fill: none; stroke: var(--testo-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mini { width: 24px; height: 12px; margin-left: auto; overflow: visible; }
.mini__body { fill: none; stroke: var(--testo-3); stroke-width: 1.3; }
.mini__fill { fill: var(--testo); }
.mini__cap { fill: var(--testo-3); }

/* the big battery and the numbers next to it */
.hero {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3.4vmin, 18px);
  padding: clamp(4px, 1.6vmin, 10px) 4px clamp(8px, 2.6vmin, 16px);
}
.cell { flex: none; width: clamp(92px, 24vmin, 124px); }
.cell__svg { display: block; width: 100%; height: auto; overflow: visible; }
.cell__body { fill: var(--carta); stroke: #d4d4d8; stroke-width: 2.2; }
.cell__cap { fill: #d4d4d8; }
.cell__track { fill: var(--riga); }
.cell__fill { fill: var(--pieno); }
.cell__shine { fill: #fff; }
.cell__ticks path { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; opacity: 0.55; }

.hero__text { min-width: 0; }
.pct {
  font-size: clamp(30px, 8.6vmin, 40px);
  line-height: 1;
  font-weight: 640;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}
.pct__u { font-size: 0.5em; font-weight: 560; color: var(--testo-2); margin-left: 2px; }
.left { margin-top: 6px; font-size: 13px; color: var(--testo-2); white-space: nowrap; }
.left__h, .left__m { display: inline-block; color: var(--testo); font-weight: 600; }

/* the row with the switch */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(7px, 2vmin, 10px);
  margin: 0 -4px;
  border-radius: 14px;
  background: var(--riga);
}
.tile {
  flex: none;
  width: clamp(34px, 8.6vmin, 42px);
  height: clamp(34px, 8.6vmin, 42px);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--carta);
  box-shadow: inset 0 0 0 1px var(--bordo);
}
.tile svg { width: 58%; height: 58%; }
.tile__bolt { fill: var(--spento); stroke: none; }

.row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row__name { font-size: 15px; font-weight: 600; cursor: pointer; }
.status { display: block; height: 17px; overflow: hidden; font-size: 12.5px; color: var(--testo-2); }
.status__t { display: block; white-space: nowrap; }

/* GSAP moves the knob, the CSS only paints it */
.switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--binario);
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(17, 17, 19, 0.08);
  touch-action: manipulation;
}
.switch:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }
.switch__knob {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(17, 17, 19, 0.1), 0 3px 8px -2px rgba(17, 17, 19, 0.3);
}
@media (hover: hover) {
  .switch:hover .switch__knob { box-shadow: 0 1px 1px rgba(17, 17, 19, 0.1), 0 4px 10px -2px rgba(17, 17, 19, 0.38); }
}

/* the jobs that pause */
.label {
  font-size: 12px;
  color: var(--testo-3);
  padding: clamp(8px, 2.4vmin, 14px) 6px clamp(2px, 0.8vmin, 4px);
}
.jobs { list-style: none; }
.job {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: clamp(5px, 1.6vmin, 9px) 6px;
  border-top: 1px solid var(--riga);
}
.job:first-child { border-top: 0; }
.job__ic { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--testo); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.job__name { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job__state { display: block; height: 17px; overflow: hidden; font-size: 12.5px; color: var(--testo-2); text-align: right; min-width: 52px; }
.job__t { display: block; }
.job.is-paused .job__t { color: #a76f00; font-weight: 560; }

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