:root {
  --fondo: #e6e9ef;          /* the paper: background and buttons are the same colour */
  --luce: rgba(255, 255, 255, 0.92);   /* the light shadow, top left */
  --ombra: rgba(150, 160, 181, 0.66);  /* the dark shadow, bottom right */
  --testo: #262b36;
  --testo-2: #586073;
  --icona: #8c94a6;          /* the icons while off */
  --accento: #ef9a2f;        /* the lamp's warm light: icon, ring, glow */
  --accento-testo: #9c5508;  /* the same warmth, dark enough to read */
}

* { 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;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 14px;
}

.panel {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

/* ---- the soft shadows: two outside (raised) and two inside (pressed), driven by --o and --i from the script ---- */
.neu {
  --o: 7;
  --i: 0;
  position: relative;
  background: var(--fondo);
  box-shadow:
    calc(var(--o) * 1px) calc(var(--o) * 1px) calc(var(--o) * 2.4px) var(--ombra),
    calc(var(--o) * -1px) calc(var(--o) * -1px) calc(var(--o) * 2.4px) var(--luce),
    inset calc(var(--i) * 1px) calc(var(--i) * 1px) calc(var(--i) * 2.2px) var(--ombra),
    inset calc(var(--i) * -1px) calc(var(--i) * -1px) calc(var(--i) * 2.2px) var(--luce);
  outline: none;
  touch-action: manipulation;
}
.neu__face {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
/* raised: the face catches the light a touch on top; pressed: concave, darker on top */
.neu__face--up { background: linear-gradient(145deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 55%, rgba(120, 130, 150, 0.05)); }
.neu__face--down { background: linear-gradient(145deg, rgba(120, 130, 150, 0.07), rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.3)); opacity: 0; }
.neu:focus-visible::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1.5px solid rgba(88, 96, 115, 0.55);
}

/* ---- the power pill ---- */
.pill {
  height: 64px;
  width: 262px;
  border-radius: 22px;
  text-align: left;
  flex: 0 1 auto;
}
.pill__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120px 70px at 34px 50%, rgba(239, 154, 47, 0.2), rgba(239, 154, 47, 0) 70%);
  opacity: 0;
  pointer-events: none;
}
.pill__in {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 0 18px 0 11px;
}
.well {
  --o: 0;
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow:
    inset 2.5px 2.5px 5px var(--ombra),
    inset -2.5px -2.5px 5px var(--luce);
}
.well__warm {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, rgba(239, 154, 47, 0.2), rgba(239, 154, 47, 0) 70%);
  opacity: 0;
}
.ring {
  position: absolute;
  inset: -5px;
  width: 52px;
  height: 52px;
  overflow: visible;
  transform: rotate(-90deg);
}
.ring__track { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 1; }
.ring__light {
  fill: none;
  stroke: var(--accento);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  opacity: 0;
  filter: drop-shadow(0 0 2px rgba(239, 154, 47, 0.55));
}
.power {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  fill: none;
  stroke: var(--icona);
  stroke-width: 1.9;
  stroke-linecap: round;
  overflow: visible;
}
.pill__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.pill__name {
  font-size: 15px;
  font-weight: 600;
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status {
  position: relative;
  display: block;
  height: 17px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  color: var(--testo-2);
  font-variant-numeric: tabular-nums;
}
.status__line {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 17px;
  white-space: nowrap;
}
.status__word--on { color: var(--accento-testo); font-weight: 600; }
.status__sep { color: var(--testo-2); opacity: 0.7; }

/* ---- the two smaller siblings ---- */
.sibs {
  display: flex;
  gap: 18px;
}
.sib {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex: none;
}
.sib[aria-disabled="true"] { cursor: default; }
.sib__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  fill: none;
  stroke: var(--icona);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
  opacity: 0.55;
}
.dim__half { fill: var(--icona); stroke: none; }

/* phone: the siblings go under the pill */
@media (max-width: 440px) {
  .panel { flex-direction: column; gap: 20px; padding: 18px 8px; }
  .pill { width: min(262px, calc(100vw - 64px)); }
}
@media (max-height: 300px) {
  .panel { padding: 10px; }
}
