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

* { box-sizing: border-box; margin: 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(12px, 4vmin, 40px);
}

.card {
  width: min(390px, 100%);
  padding: clamp(12px, 3vmin, 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 of the settings page */
.top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--testo-3);
  padding: 0 2px clamp(8px, 2.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; }

/* the Wi-Fi row */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(8px, 2vmin, 10px);
  margin: 0 -4px;
  border-radius: 14px;
  background: var(--riga);
}

.tile {
  position: relative;
  flex: none;
  width: clamp(38px, 9vmin, 44px);
  height: clamp(38px, 9vmin, 44px);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--carta);
  box-shadow: inset 0 0 0 1px var(--bordo);
}
.tile__ring {
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  border: 1.5px solid var(--accento);
  opacity: 0;
  pointer-events: none;
}
.wifi { width: 66%; height: 66%; overflow: visible; }
.wifi__arc { color: var(--spento); }
path.wifi__arc { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.wifi__dot { fill: currentColor; }

.row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row__name { font-size: 15px; font-weight: 620; letter-spacing: -0.01em; cursor: pointer; }
.status { display: block; height: 1.35em; overflow: hidden; font-size: 13px; color: var(--testo-2); font-variant-numeric: tabular-nums; }
.status__t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the switch: GSAP moves the knob, the CSS only paints it */
.switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  padding: 0;
  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);
}

/* the hint under the row while it is off */
.hint {
  overflow: hidden;
  font-size: 12.5px;
  color: var(--testo-3);
}
.hint__t { display: block; padding: clamp(8px, 2vmin, 12px) 6px 2px; }

/* the networks that drop in once connected */
.list { height: 0; overflow: hidden; }
.list__in { padding-top: clamp(6px, 1.6vmin, 10px); }
.list__label {
  font-size: 11.5px;
  font-weight: 560;
  color: var(--testo-3);
  letter-spacing: 0.02em;
  padding: clamp(4px, 1.4vmin, 8px) 6px 2px;
}

.net {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: clamp(38px, 8.6vmin, 48px);
  padding: 4px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.net--current { cursor: default; }
@media (hover: hover) {
  .net[data-net]:hover { background: var(--riga); }
  .switch:hover .switch__knob { box-shadow: 0 1px 1px rgba(17, 17, 19, 0.1), 0 4px 10px -2px rgba(17, 17, 19, 0.36); }
}
.net[data-net].is-hover { background: var(--riga); }
.net[data-net].is-press { background: var(--riga-sopra); }
.net:focus-visible { outline: 2px solid var(--accento); outline-offset: -2px; }

.bars { flex: none; width: 18px; height: 14px; }
.bars rect { fill: var(--binario); }
.bars rect.is-on { fill: var(--testo); }
.net--current .bars rect.is-on { fill: var(--accento); }

.net__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.net__name { font-size: 14px; font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net--current .net__name { font-weight: 640; }
.net__sub { font-size: 12px; color: var(--testo-3); white-space: nowrap; }
.net--current .net__sub { color: var(--accento); }

.net__tick { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--accento); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.net__lock { flex: none; width: 12px; height: 14px; fill: none; stroke: var(--testo-3); stroke-width: 1.5; }
.net__lock.is-open { visibility: hidden; }

/* 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;
}
