/* Force: a minimal physics piece. A warm white room, one hairline for the bar of the cradle and five capitals hung
   from it on threads as thin as a hair. Everything is one SVG redrawn by the script at every frame. */
:root {
  --paper: #f3f0e8;     /* the room */
  --ink: #141414;       /* the letters and the bar */
  --thread: #a49e92;    /* a thread at rest */
  --accent: #e5432a;    /* a thread carrying the knock */
  --muted: #8c877d;     /* the small print and the gauge */
  --weight: 760;        /* how heavy the letters are (100 to 900) */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  outline: none;
}

.stage.is-over {
  cursor: grab;
}

.stage.is-grabbing {
  cursor: grabbing;
}

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

.bar,
.end {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
}

.clamp {
  fill: var(--ink);
}

.thread {
  stroke: var(--thread);
  stroke-width: 1;
  stroke-linecap: butt;
}

.glyph {
  fill: var(--ink);
  font-family: 'Archivo Variable', system-ui, sans-serif;
  font-weight: var(--weight);
  font-stretch: 100%;
}

.gauge__plumb,
.gauge__arc {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
}

.gauge__plumb {
  stroke-dasharray: 3 4;
}

.gauge__deg {
  fill: var(--ink);
  font-family: 'Archivo Variable', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hint,
.read {
  position: absolute;
  bottom: 22px;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--muted);
  pointer-events: none;
}

.hint {
  left: 24px;
  max-width: calc(100% - 150px);
}

.read {
  right: 24px;
  display: flex;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

.read__value {
  display: inline-block;
  min-width: 2.4em;
  text-align: right;
  font-weight: 600;
  color: var(--ink);
}

.stage:focus-visible .read__label {
  color: var(--ink);
}

@media (max-width: 560px) {
  .hint {
    left: 16px;
    bottom: 18px;
  }

  .read {
    right: 16px;
    bottom: 18px;
  }
}
