/* The dashed outline button: a thin warm white outline on a black page, one orange line for the save. The words are
   Archivo, whose width and weight move under the pointer and as the new words land. */
:root {
  --page: #000000;          /* the page */
  --ink: #f2efe8;           /* the solid outline and the words */
  --dash: #8d897f;          /* the dashes at rest */
  --muted: #77736b;         /* the small line under the pill and the crop marks */
  --accent: #ff6a3d;        /* the line that saves and the tick */
  --focus: #f2efe8;         /* 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;
}

.dash {
  display: grid;
  justify-items: center;
  gap: 18px;
}

/* the frame holds the pill and the four crop marks around it */
.dash__frame {
  position: relative;
  padding: 12px;
}

.dash__marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.dash__mark {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  stroke-linecap: square;
}

/* ---------------------------------------------------------------- the pill */
.dash__btn {
  position: relative;
  display: block;
  width: 236px;
  max-width: calc(100vw - 64px);
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

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

html[data-using='pointer'] .dash__btn:focus-visible {
  outline: none;
}

/* the outline: an SVG as big as the pill, its view box set by the script in pixels */
.dash__line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.dash__ink {
  fill: none;
  stroke: var(--dash);
  stroke-width: 1.5;
  stroke-linecap: butt;
}

.dash__run {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0;
}

/* ---------------------------------------------------------------- the words */
.dash__words {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 999px;
  pointer-events: none;
}

.dash__word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.005em;
  font-weight: 440;
  font-stretch: 100%;
  padding-bottom: 1px;
}

.dash__word--busy {
  opacity: 0;
  visibility: hidden;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 380;
  color: var(--dash);
}

.dash__word--done {
  opacity: 0;
  visibility: hidden;
  font-weight: 300;
  font-stretch: 118%;
}

.dash__tick {
  width: 15px;
  height: 15px;
  flex: none;
  overflow: visible;
}

.dash__tick path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash__note {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
