/* Chain: a minimal physics piece. A warm white room, one hairline for the floor and the letters of a word standing
   on it as dominoes, each in a tall tile drawn with a single thin line. One SVG, drawn by the script. */
:root {
  --paper: #f3f0e8;     /* the room */
  --ink: #141414;       /* the tiles and the letters */
  --accent: #e5432a;    /* the knock, as it runs through the word */
  --muted: #8c877d;     /* the floor and the small print */
  --weight: 720;        /* 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: 'Anybody Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

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

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

.floor {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
}

.tick {
  stroke: var(--muted);
  stroke-width: 1;
}

.tile__box {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1;
}

.tile__glyph {
  fill: var(--ink);
  font-family: 'Anybody Variable', system-ui, sans-serif;
  font-weight: var(--weight);
}

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

.top {
  position: absolute;
  top: 22px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.top__brand {
  font-weight: 700;
  font-stretch: 80%;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.top__note {
  color: var(--muted);
  font-weight: 450;
  text-align: right;
}

.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% - 170px);
}

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

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

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

  .hint {
    left: 16px;
    bottom: 18px;
  }

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