/* The spring-loaded button: a thin ink pill on a white page, a hairline coil spring inside it and one cobalt accent
   that grows as the spring is loaded. The words are Archivo, whose width and weight follow the spring. */
:root {
  --page: #ffffff;          /* the page */
  --ink: #141414;           /* the pill's line, the words and the coil */
  --muted: #8a8780;         /* the small line under the pill */
  --accent: #2b45ff;        /* the loaded spring and the plate it pushes */
  --line: #d9d6cf;          /* the hairline ticks that light up as the spring loads */
  --focus: #141414;         /* the ring of the keyboard's focus */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.coil {
  display: grid;
  justify-items: stretch;
  gap: 16px;
}

/* ---------------------------------------------------------------- the pill */
.coil__btn {
  position: relative;
  display: block;
  width: 268px;
  max-width: calc(100vw - 32px);
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--page);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.coil__btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* the words and the spring ride inside the pill, clipped by its rounded ends */
.coil__track {
  position: absolute;
  inset: 1.5px;
  border-radius: 999px;
  overflow: hidden;
  pointer-events: none;
}

.coil__word {
  position: absolute;
  left: 0;
  top: 50%;
  margin-top: -12px;
  height: 24px;
  line-height: 24px;
  font-size: 17px;
  letter-spacing: 0.005em;
  white-space: nowrap;
  font-weight: 420;
  font-stretch: 100%;
  will-change: transform;
}

.coil__spring {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.coil__wire {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.coil__plate {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.coil__ticks {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  stroke-linecap: round;
}

.coil__lit {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-linecap: round;
}

.coil__check {
  width: 0;
  height: 13px;
  flex: none;
  overflow: visible;
}

.coil__check path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.coil__note {
  display: flex;
  align-items: center;
  gap: 0;
  justify-self: start;
  margin: 0 0 0 26px;
  max-width: calc(100% - 52px);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
  font-stretch: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
