:root {
  --fondo: #000000;
  --carta: #0d0e10;
  --carta-2: #15161a;
  --linea: #222328;
  --testo: #f2f1ee;
  --testo-2: #8c8b92;
  --testo-3: #55555c;
  --accento: #ffb547;        /* the single accent: warm amber, the lamp that comes on */
  --accento-velo: rgba(255, 181, 71, .12);
  --metallo: #c9c8cd;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { font-size: clamp(12px, min(3.5vw, 3.1vh), 17px); }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Inter 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 { min-height: 100vh; display: grid; place-items: center; padding: 1em; }

.card {
  position: relative;
  width: min(19em, 92vw);
  background: linear-gradient(180deg, var(--carta-2), var(--carta) 60%);
  border: 1px solid var(--linea);
  border-radius: 1.4em;
  padding: 1.15em 1.2em 1.3em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 30px 60px -36px rgba(0, 0, 0, .9);
}

.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1em; }
.head__text { display: flex; flex-direction: column; gap: .2em; min-width: 0; }
.room { font-size: .72em; color: var(--testo-2); letter-spacing: .02em; }
.name { font-size: 1.05em; font-weight: 560; letter-spacing: -.01em; }
.state {
  height: 1.6em; overflow: hidden; border-radius: 99px;
  border: 1px solid var(--linea); padding: 0 .7em;
  font-size: .7em; line-height: 1.6em; color: var(--testo-2);
  display: inline-grid; grid-template-columns: minmax(0, 1fr);
}
.state__roll { display: flex; flex-direction: column; text-align: center; }
.state__roll span { display: block; height: 1.6em; }
.state.is-on { color: var(--accento); border-color: rgba(255, 181, 71, .35); }

.scene { margin: .7em -.4em 0; }
.scene__svg { display: block; width: 100%; height: auto; overflow: visible; }
.cable { fill: none; stroke: #2e2f35; stroke-width: 3.6; stroke-linecap: round; }
.cable__shine { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: .8; stroke-linecap: round; transform: translateY(-.9px); }
.sleeve { fill: url(#guaina); }
.sleeve__ring { fill: none; stroke: rgba(0, 0, 0, .45); stroke-width: .5; }
.plug { fill: url(#plastica); }
.plug__face { fill: url(#faccia); }
.plug__rim { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: .5; stroke-linecap: round; }
.plug__clip { fill: #8f9097; }
.plug__seam { stroke: rgba(255, 255, 255, .06); stroke-width: .4; }
.rib { fill: url(#costola); }
.rib__groove { stroke: rgba(0, 0, 0, .55); stroke-width: .6; }
.plug__shine { fill: none; stroke: rgba(255, 255, 255, .13); stroke-width: .6; stroke-linecap: round; }
.prong { fill: url(#spinotto); }
.wall__plate { fill: url(#placca); }
.wall__bevel { fill: url(#smusso); }
.wall__socket { fill: url(#incasso); }
.wall__lip { stroke: rgba(255, 255, 255, .08); stroke-width: .5; }
.wall__shadow { fill: url(#ombra); }
.wall__edge { stroke-width: 1.2; }

.power { display: flex; flex-direction: column; align-items: center; margin-top: .6em; }
.power__hold { position: relative; width: 6.4em; height: 6.4em; display: grid; place-items: center; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring__track { fill: none; stroke: var(--linea); stroke-width: 1.5; }
.ring__fill { fill: none; stroke: var(--accento); stroke-width: 2; stroke-linecap: butt; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; }

.btn {
  position: relative; width: 5.2em; height: 5.2em; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 22%, #2a2b31 0%, #18191d 55%, #111215 100%);
  border: 1px solid #2e2f35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 -6px 12px rgba(0, 0, 0, .35), 0 10px 22px -12px rgba(0, 0, 0, .9);
  overflow: hidden;
}
.btn:focus-visible { outline: 2px solid var(--accento); outline-offset: 6px; }
.btn__shine {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(60% 40% at 34% 18%, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 70%);
}
.btn__tint { position: absolute; inset: 0; border-radius: 50%; background: var(--accento-velo); opacity: 0; }
.btn__icon { position: relative; width: 1.9em; height: 1.9em; fill: none; stroke: var(--testo-2); stroke-width: 1.9; stroke-linecap: round; }

.watts {
  margin-top: 1em; display: inline-flex; align-items: baseline; justify-content: center; gap: .25em;
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  padding: .35em .9em; border-radius: 99px; border: 1px solid var(--linea); background: rgba(255, 255, 255, .02);
}
.watts__num { display: inline-flex; align-items: flex-start; font-size: 1.25em; font-weight: 500; line-height: 1.2em; height: 1.2em; overflow: hidden; letter-spacing: -.02em; }
.col { display: flex; flex-direction: column; flex: none; width: .62em; text-align: center; }
.col span { display: block; height: 1.2em; }
.dot { width: .35em; text-align: center; }
.watts__unit { font-size: .78em; color: var(--testo-2); }
.watts.is-on .watts__num { color: var(--testo); }
.watts:not(.is-on) .watts__num { color: var(--testo-3); }
.hint { margin-top: .6em; font-size: .68em; color: var(--testo-3); letter-spacing: .01em; }
