:root {
  --bg: #0a0c0d;
  --card: #141718;
  --ink: #f1f4f2;
  --soft: rgba(241, 244, 242, 0.6);
  --faint: rgba(241, 244, 242, 0.34);
  --line: rgba(241, 244, 242, 0.09);
  --accent: #3ddc84;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(80% 55% at 50% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 72%), var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.ev { position: relative; width: min(324px, 100%); padding: 14px; border-radius: 26px; background: linear-gradient(180deg, #191d1e, var(--card)); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 40px 60px -30px rgba(0, 0, 0, 0.8); }

.ev__head { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.ev__bolt { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.ev__bolt svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.600; stroke-linecap: round; stroke-linejoin: round; }
.ev__bolt .bl { fill: color-mix(in srgb, var(--accent) 30%, transparent); transform-box: fill-box; transform-origin: 50% 50%; transition: opacity 0.25s ease, transform 0.35s ease; }
.ev__bolt .ck { stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 0.4s ease 0.15s, opacity 0.1s ease 0.1s; }
.ev.is-full .ev__bolt .bl { opacity: 0; transform: scale(0.6); }
.ev.is-full .ev__bolt .ck { stroke-dashoffset: 0; opacity: 1; }
.ev.is-paused .ev__bolt { background: rgba(241, 244, 242, 0.06); box-shadow: inset 0 0 0 1px var(--line); }
.ev.is-paused .ev__bolt svg { stroke: var(--soft); }
.ev.is-paused .ev__bolt .bl { fill: transparent; }
.ev__name { flex: 1 1 auto; min-width: 0; display: grid; }
.ev__name b { font-size: 14.500px; line-height: 19px; font-weight: 720; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev__stateroll { height: 15px; overflow: hidden; font-size: 11.500px; line-height: 15px; font-weight: 560; color: var(--soft); white-space: nowrap; }
.ev__stateroll span { display: block; }
.ev__eta { flex: none; display: grid; justify-items: end; transition: opacity 0.3s ease; }
.ev__eta b { font-size: 19px; line-height: 21px; font-weight: 760; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ev__eta span { font-size: 10.500px; line-height: 13px; font-weight: 580; color: var(--soft); }
.ev.is-full .ev__eta, .ev.is-paused .ev__eta { opacity: 0.35; }

.ev__battery { position: relative; margin-top: 12px; }
.ev__battery svg { display: block; width: 100%; height: auto; overflow: visible; }
.ev__battery .shell { fill: #0d0f10; stroke: rgba(241, 244, 242, 0.16); stroke-width: 1.500; }
.ev__battery .cap { fill: rgba(241, 244, 242, 0.2); }
.ev__battery .fill { fill: var(--accent); transition: fill 0.4s ease; }
.ev.is-paused .ev__battery .fill { fill: color-mix(in srgb, var(--accent) 45%, #5c6562); }
.ev__battery .sheen { fill: #ffffff; opacity: 0.16; transform: skewX(-18deg); transform-box: fill-box; }
.ev__battery .ticks { fill: none; stroke: rgba(0, 0, 0, 0.3); stroke-width: 1.500; }
.ev__battery .limit { fill: none; stroke: var(--ink); stroke-width: 1.500; stroke-dasharray: 3 4; stroke-linecap: round; opacity: 0.7; }
.ev__pct { position: absolute; left: 7%; top: 50%; display: flex; align-items: baseline; gap: 1px; transform: translateY(-50%); color: #06120b; font-variant-numeric: tabular-nums; mix-blend-mode: normal; }
.ev__pct b { font-size: clamp(30px, 11vw, 40px); line-height: 1; font-weight: 780; letter-spacing: -0.03em; }
.ev__pct span { font-size: 15px; font-weight: 720; }
.ev__to { position: absolute; right: 9%; top: 50%; height: 15px; overflow: hidden; transform: translateY(-50%); font-size: 11.500px; line-height: 15px; font-weight: 620; color: var(--soft); white-space: nowrap; }
.ev__to span { display: block; }

.ev__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.ev__stats div { padding: 7px 9px 8px; border-radius: 12px; background: rgba(241, 244, 242, 0.045); box-shadow: inset 0 0 0 1px var(--line); }
.ev__stats dt { font-size: 10.500px; line-height: 13px; font-weight: 600; color: var(--soft); }
.ev__stats dd { margin-top: 2px; font-size: 11.500px; line-height: 18px; font-weight: 600; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev__stats b { font-size: 15.500px; font-weight: 740; letter-spacing: -0.01em; color: var(--ink); }

/* the power over the charge: flat at first, then tapering as the battery fills */
.ev__curve { display: block; width: 100%; height: 30px; margin-top: 8px; overflow: visible; }
.ev__curve path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ev__curve .back { stroke: rgba(241, 244, 242, 0.14); }
.ev__curve .front { stroke: var(--accent); stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke 0.4s ease; }
.ev.is-paused .ev__curve .front { stroke: var(--soft); }

.ev__go { display: block; width: 100%; height: 44px; margin-top: 8px; border: 0; border-radius: 14px; background: #24292a; color: var(--ink); font: inherit; font-size: 13.500px; font-weight: 700; cursor: pointer; outline: none; box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07); transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ev.is-paused .ev__go { background: var(--accent); color: #06120b; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 14px 22px -14px color-mix(in srgb, var(--accent) 80%, transparent); }
.ev__go:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.ev__gotext { display: block; height: 20px; line-height: 20px; overflow: hidden; }
.ev__gotext span { display: block; white-space: nowrap; }
@media (hover: hover) { .ev:not(.is-paused) .ev__go:hover { background: #2e3435; } .ev.is-paused .ev__go:hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); } }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #f1f4f2; stroke: #0a0c0d; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 6; }
