/* A street plan printed in one ink and black. Out of reach the ink is flooded and the streets are bare paper;
   within reach the plate is reversed. The edge between the two is the slider. */
.wc {
  --ink: #ff6a13;
  --paper: #fcfbf8;
  --black: #15120f;
  position: relative;
  width: 540px;
  height: 540px;
  overflow: hidden;
  background: var(--paper);
  color: var(--black);
  font-family: "Anybody Variable", sans-serif;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  touch-action: none;
}
.wc[data-dragging],
.wc[data-dragging] * {
  cursor: grabbing !important;
}

/* ---- the two plates ---- */
.wc-plate,
.wc-black,
.wc-thin,
.wc-paper {
  position: absolute;
  inset: 0;
  display: block;
  width: 540px;
  height: 540px;
}
.wc-out {
  --ground: var(--ink);
  --line: var(--paper);
}
.wc-in {
  --ground: var(--paper);
  --line: var(--ink);
}
.wc-reach {
  position: absolute;
  inset: 0;
  clip-path: circle(var(--r) at 270px 270px);
}
.wc-ground {
  fill: var(--ground);
}
.wc-line-fill {
  fill: var(--line);
}
.wc-st {
  fill: none;
  stroke: var(--line);
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* ---- black: the lines, the stops and the slider ---- */
.wc-black text {
  text-rendering: geometricPrecision;
}
.wc-black path {
  fill: none;
}
.wc-rail,
.wc-tram-line,
.wc-metro-line {
  stroke: var(--black);
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.wc-rail {
  stroke-width: 0.5;
}
.wc-tram-line {
  stroke-width: 1;
}
.wc-metro-line {
  stroke-width: 3;
}

.wc-stop {
  fill: var(--paper);
  stroke: var(--black);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
}
/* a stop the rim has passed is stamped solid */
.wc-stop[data-in] {
  fill: var(--black);
  animation: wc-stamp 200ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes wc-stamp {
  from {
    transform: scale(2.2);
  }
}

.wc-here {
  fill: var(--black);
  stroke: var(--paper);
  stroke-width: 2.5;
}

.wc-here-name {
  font-size: 8.5px;
  font-weight: 800;
  font-stretch: 92%;
  letter-spacing: 0.09em;
  text-anchor: end;
  fill: var(--black);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 3.5px;
  stroke-linejoin: round;
}
.wc-here-name[data-out] {
  stroke: var(--ink);
}

/* north leans, because the grid of the city is square to the sheet */
.wc-north path {
  fill: var(--black);
}
.wc-north .wc-north-clear {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 7;
  stroke-linejoin: round;
}
.wc-north text {
  font-size: 12.5px;
  font-weight: 800;
  font-stretch: 105%;
  text-anchor: middle;
  fill: var(--paper);
}

/* the rim, and the ink cleared from under its lettering */
.wc-black .wc-rim {
  fill: none;
  stroke: var(--black);
  stroke-width: 3.5;
  transition: stroke-width 120ms ease-out;
}
/* the whole rim can be taken hold of */
.wc[data-near] {
  cursor: grab;
}
.wc[data-near] .wc-rim,
.wc[data-dragging] .wc-rim {
  stroke-width: 5;
}
.wc-black .wc-clear {
  stroke: var(--ink);
}
.wc-big {
  font-size: 21px;
  font-weight: 800;
  font-stretch: 82%;
  letter-spacing: 0.035em;
  fill: var(--black);
}
.wc-small {
  font-size: 12.5px;
  font-weight: 750;
  font-stretch: 92%;
  letter-spacing: 0.07em;
  fill: var(--black);
}
.wc-key {
  fill: var(--black);
}
.wc-ruler {
  visibility: hidden;
}

.wc-tag {
  font-size: 10.5px;
  font-weight: 800;
  font-stretch: 88%;
  letter-spacing: 0.06em;
  fill: var(--black);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 5px;
  stroke-linejoin: round;
}

/* ---- the slider: its track is the radius under the thumb, and is not drawn ---- */
.wc-slider {
  position: absolute;
  left: 270px;
  top: 270px;
  width: 0;
  height: 0;
}
.wc-control {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
}
/* from 3 minutes out to 20, at 11.6 px a minute */
.wc-track {
  left: 34.8px;
  width: 197.2px;
  height: 0;
}
.wc-thumb {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  outline: none;
  cursor: grab;
  /* the thumb rides the rim as drawn, which eases after the value */
  transform: translateX(calc(var(--r) - var(--snap)));
}
.wc-knob {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--black);
  color: var(--paper);
  font-size: 23px;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -0.01em;
  box-shadow: 0 0 0 0 var(--black);
  transition: box-shadow 120ms ease-out;
}
.wc-thumb:hover .wc-knob {
  box-shadow: 0 0 0 2.5px var(--black);
}
.wc[data-dragging] .wc-knob {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--black);
}
.wc-thumb:has(:focus-visible) .wc-knob {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--black);
}

/* the sheet itself: where the ink lies thin the paper shows through, and the paper has its grain */
.wc-thin {
  mix-blend-mode: screen;
  opacity: 0.5;
  pointer-events: none;
}
.wc-paper {
  mix-blend-mode: multiply;
  pointer-events: none;
}
