.rs {
  --green: #00774a;
  --white: #fbfcf8;
  --yellow: #ffcf06;
  --black: #111310;
  --blue: #1257b4;
  --cells: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8.66' height='15'%3E%3Cpath d='M4.33 0L8.66 2.5V7.5L4.33 10 0 7.5V2.5ZM4.33 10V15' fill='none' stroke='%23fff' stroke-width='.7'/%3E%3C/svg%3E");
  position: relative;
  width: 540px;
  height: 540px;
  overflow: hidden;
  background: var(--green);
  color: var(--white);
  font-family: "Overpass Variable", sans-serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  cursor: default;
  user-select: none;
}
.rs *, .rs *::before, .rs *::after { box-sizing: border-box; }
.rs p { margin: 0; }
.rs i { font-style: normal; }

/* the sheeting: lit from low in front, as headlights light a sign, with the cell pattern of the film just showing */
.rs-sheet {
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 95% at 50% 64%, #008f58 0%, #007b4c 42%, #005c39 100%);
}
.rs-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cells);
  opacity: 0.075;
}
/* the sign border, and the rule between the route panel and the options under it */
.rs-sheet::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 4px solid var(--white);
  border-radius: 21px;
  background: linear-gradient(var(--white), var(--white)) 0 362px / 100% 4px no-repeat;
}

/* destination and summary */
.rs-head { position: absolute; left: 27px; right: 27px; top: 0; }
.rs-to {
  position: absolute;
  left: -5px;
  top: 22px;
  font-size: 57px;
  line-height: 60px;
  font-weight: 650;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.rs-sum {
  position: absolute;
  left: -1px;
  top: 82px;
  height: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 21px;
  line-height: 20px;
}
.rs-km i, .rs-via i, .rs-eta i { font-size: 16px; font-weight: 500; }
.rs-km, .rs-via > i { position: relative; top: 2px; }
.rs-via { display: flex; align-items: center; gap: 5px; height: 20px; }
.rs-via > i { margin-right: 1px; }
.rs-eta {
  position: absolute;
  right: -1.5px;
  top: 84px;
  font-size: 21px;
  line-height: 20px;
  white-space: nowrap;
}

/* the message panel let into the sign */
.rs-panel {
  position: absolute;
  right: 0;
  top: 26px;
  padding: 6px 8px;
  background: #0a0b08;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px #000, inset 0 2px 3px #000;
  line-height: 0;
}
.rs-vms { display: block; overflow: visible; }
.rs-vms-off { fill: #2e250c; }
.rs-vms-on { fill: #ffbe2e; filter: drop-shadow(0 0 1.5px #ff9500); }
.rs-vms-on[data-rewrite] > g { animation: rs-write 1ms linear both; animation-delay: calc(110ms + var(--row) * 38ms); }
@keyframes rs-write { from { opacity: 0; } to { opacity: 1; } }
.rs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* route diagram */
.rs-map { position: absolute; inset: 0; width: 540px; height: 540px; pointer-events: none; }
.rs-map path { fill: none; }
.rs-roads path { stroke: #62b891; stroke-width: 6; }
.rs-roads path[data-wide] { stroke-width: 9; }
.rs-roads[data-shut] { opacity: 0.32; }
.rs-shaft, .rs-left { stroke: var(--white); stroke-width: 12; }
.rs-left { animation: rs-leave 300ms linear both; }
@keyframes rs-leave { to { opacity: 0; } }
.rs-map .rs-arrow { fill: var(--white); }

.rs-marks { position: absolute; inset: 0; pointer-events: none; }
.rs-mark { position: absolute; display: grid; justify-items: center; gap: 3px; transform: translate(-50%, -10px); }
.rs-mark[data-shut] { opacity: 0.42; }
.rs-plate {
  display: grid;
  place-items: center;
  height: 20px;
  min-width: 30px;
  padding: 3px 5px 0;
  border: 1.5px solid var(--white);
  border-radius: 4px;
  box-shadow: 0 0 0 1.5px #00683f;
  font-size: 13.5px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0.01em;
}
.rs-plate[data-kind="a"] { background: var(--blue); color: var(--white); }
.rs-plate[data-kind="n"] { background: var(--white); color: var(--black); }
.rs-plate[data-kind="ferry"] { background: #00683f; color: var(--white); padding: 0 4px; }
.rs-plate svg { display: block; width: 21px; height: 8px; fill: currentColor; }
.rs-toll {
  height: 14px;
  padding: 3px 4px 0;
  border-radius: 2.5px;
  background: var(--yellow);
  box-shadow: 0 0 0 1.5px #00683f;
  color: var(--black);
  font-size: 9.5px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* the avoidances: four plates. Green until chosen, then a yellow plate with its symbol struck out. */
.rs-label {
  position: absolute;
  left: 25.5px;
  top: 382.5px;
  font-size: 27px;
  line-height: 28px;
  font-weight: 650;
}
.rs-group {
  position: absolute;
  left: 27px;
  right: 27px;
  top: 415px;
  height: 99px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.rs-opt {
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: grid;
  grid-template-rows: 62px 1fr;
  justify-items: center;
  border: 2.5px solid var(--white);
  border-radius: 9px;
  color: var(--white);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rs-sym { position: relative; z-index: 1; align-self: end; width: 72px; height: 49.5px; fill: currentColor; overflow: visible; }
.rs-bar { display: none; fill: none; stroke: var(--black); stroke-width: 4; }
.rs-bar[data-edge] { stroke: var(--yellow); stroke-width: 8.5; }
.rs-name { position: relative; z-index: 1; align-self: center; padding-top: 4px; font-size: 16.5px; line-height: 1; font-weight: 650; }
.rs-opt:hover:not([data-pressed]) { background: #ffffff1c; }
.rs-opt[data-pressed] {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--black);
}
/* the black edge is printed over the film, like the symbol, so the light passes under both */
.rs-opt[data-pressed]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 6.5px;
  box-shadow: inset 0 0 0 2.5px var(--black);
}
.rs-opt[data-pressed] .rs-bar { display: block; }
.rs-opt:active .rs-sym, .rs-opt:active .rs-name { transform: translateY(1px); }
/* focus: a second border line outside the plate, the way a sign doubles its edge */
.rs-opt:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

/* headlights crossing the film as a plate lights */
.rs-glint {
  position: absolute;
  inset: -2.5px;
  border-radius: 9px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.rs-glint::before, .rs-glint::after {
  content: "";
  position: absolute;
  inset: 0 -100%;
  background: linear-gradient(108deg, #fff0 35%, #fffc 46%, #fff 50%, #fffc 54%, #fff0 65%);
  transform: translateX(-27%);
}
.rs-glint::before { opacity: 0.8; }
.rs-glint::after { -webkit-mask: var(--cells); mask: var(--cells); }
.rs-opt[data-pressed] .rs-glint { animation: rs-lit 760ms linear both; }
.rs-opt[data-pressed] .rs-glint::before, .rs-opt[data-pressed] .rs-glint::after { animation: rs-pass 760ms cubic-bezier(0.3, 0.2, 0.3, 1) both; }
@keyframes rs-lit { 0%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rs-pass { from { transform: translateX(-27%); } to { transform: translateX(27%); } }
