.v-signpost {
  --blue: #1d4f91; --green: #1b6b3a; --yellow: #ffcb05; --red: #c4281c; --ink: #14181c; --white: #fff; --asphalt: #2a2d32;
  --sign: var(--blue); --post: 17%;
  background: linear-gradient(#9cc3e0, #dcebf4 62%); color: var(--ink); font: 600 1rem/1.4 Overpass, system-ui, sans-serif;
}
.v-signpost :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.sp-bar, .sp-intro { width: 100%; max-width: 33rem; margin-inline: auto !important; }
.sp-bar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem 0; }
.sp-bar h1 { font-size: 1.125rem; font-weight: 800; letter-spacing: -0.01em; }
.sp-intro { padding: 0.5rem 7rem 0 1.25rem; color: #1f3a52; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; text-wrap: pretty; }
.sp-steps { display: flex; gap: 0.375rem; }
.sp-steps li { display: grid; place-items: center; width: 1.75rem; height: 1.25rem; border-radius: 4px; background: var(--blue); color: var(--white); opacity: 0.35; }
.sp-steps li.now { opacity: 1; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--blue); }
.sp-steps li.won { opacity: 1; background: var(--green); }
.sp-steps li.lost { opacity: 1; background: var(--white); color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.sp-steps svg { width: 0.75rem; height: 0.75rem; }

/* the scene: sky, two ranges of hills, and the rig standing in front of them */
.sp-scene { flex: 1; display: flex; flex-direction: column; padding: 1.25rem 1.25rem 0; overflow: hidden;
  background: radial-gradient(90% 9rem at 85% 100%, #7fae8c 0 99%, transparent 100%), radial-gradient(110% 12rem at 10% 100%, #a3c7ad 0 99%, transparent 100%); }
.sp-rig { position: relative; flex: 1; display: flex; flex-direction: column; gap: 0.75rem; width: 100%; max-width: 30.5rem; margin-inline: auto; padding-bottom: 1.5rem; }
.sp-rig::before, .sp-rig::after { content: ""; position: absolute; z-index: 0; top: 3.5rem; bottom: 0; width: 0.8rem; background: linear-gradient(90deg, #6d7781, #c3cbd2 45%, #7d8791); }
.sp-rig::before { left: calc(var(--post) - 0.4rem); }
.sp-rig::after { right: calc(var(--post) - 0.4rem); }
.sp-rig > * { position: relative; z-index: 1; }

/* ---- the big sign ---- */
.sp-sign { z-index: 3 !important; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.875rem; margin-top: 3.1rem; padding: 1.125rem 1.125rem 1.25rem; border-radius: 4px 4px 16px 16px; background: var(--sign); color: var(--white); outline: 3px solid var(--white); outline-offset: -8px; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 14px 22px -8px rgb(10 30 60 / 0.55); transform-origin: 50% 0; }
.sp-sign.won { --sign: var(--green); }
.sp-sign.lost { --sign: #3a4048; }
.sp-sign.total { --sign: var(--ink); }
.sp-sign.small { margin-top: 0; border-radius: 12px; padding: 0.875rem 1rem; }

/* exit tabs: they stand up off the sign's top edge, the same metal as the sign, white keyline, square shoulders */
.sp-tabs { position: absolute; inset: auto 0 100% 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.sp-tab { display: grid; gap: 0.1rem; align-content: center; height: 3.1rem; padding: 0.3rem 0.8rem 0.2rem; border: 0; border-radius: 10px 10px 0 0; background: var(--sign); color: var(--white); text-align: start; box-shadow: inset 0 3px 0 -0px transparent; outline: 3px solid var(--white); outline-offset: -8px; clip-path: inset(0 0 5px 0); margin-bottom: -5px; }
.sp-tab small { display: flex; justify-content: space-between; align-items: center; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; padding-inline: 0.3rem; }
.sp-tab b { padding-inline: 0.3rem; font-size: 1.0625rem; font-weight: 800; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-tab.blank b { letter-spacing: -0.03em; text-overflow: clip; color: var(--yellow); }
.sp-tab i { font-style: normal; font-size: 0.75rem; font-weight: 800; padding: 0 0.3rem; border-radius: 3px; background: var(--yellow); color: var(--ink); opacity: 1; }
.sp-tab.blank:disabled { cursor: default; }
.sp-tab.blank:disabled b, .sp-tab.blank:disabled small { opacity: 0.4; }
@media (hover: hover) { .sp-tab.blank:not(:disabled):hover b { color: var(--white); } }

/* the face: arrow, name, and a route shield carrying the points */
.sp-face { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.875rem; padding: 0.5rem 0.375rem 0; }
.sp-arrow { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; color: var(--white); }
.sp-arrow svg { width: 2.5rem; height: 2.5rem; }
.sp-name { display: block; font-size: clamp(1.125rem, calc(19rem / var(--n, 8)), 2.125rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; overflow-wrap: anywhere; }
/* an advisory line for a name that is also somewhere else */
.sp-not { display: inline-block; margin-top: 0.4rem; padding: 0.1rem 0.45rem 0; background: var(--yellow); color: var(--ink); font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.sp-answer { display: block; margin-top: 0.35rem; color: var(--yellow); font-size: 1.375rem; font-weight: 800; line-height: 1.1; }
.sp-shield { display: grid; justify-items: center; align-content: start; width: 3.5rem; height: 3.9rem; padding-top: 0.25rem; background: linear-gradient(var(--red) 0 1.05rem, var(--white) 1.05rem 1.2rem, #163f77 1.2rem); color: var(--white); clip-path: path("M4 0 Q28 7 52 0 L56 10 Q57 34 46 50 Q38 60 28 62.4 Q18 60 10 50 Q-1 34 0 10 Z"); line-height: 1; }
.sp-shield small { font-size: 0.625rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sp-shield b { margin-top: 0.4rem; font-size: 1.875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-sign.won .sp-shield { background: linear-gradient(var(--yellow) 0 1.05rem, var(--white) 1.05rem 1.2rem, #0f4a26 1.2rem); }
.sp-sign.won .sp-shield small { color: var(--ink); }
.sp-sign.lost .sp-shield { background: linear-gradient(#6b727a 0 1.05rem, var(--white) 1.05rem 1.2rem, #22262b 1.2rem); }
.sp-sign.lost .sp-arrow { color: #ff8a7d; }

/* the destination panel: white, like the inset panels real signs carry, and you letter the city into it */
.sp-slot { display: flex; gap: 0.375rem; padding: 0.3rem; border-radius: 3px 3px 9px 9px; background: var(--white); }
.sp-slot input { flex: 1; min-width: 0; height: 3rem; padding-inline: 0.7rem; border: 0; border-radius: 3px 3px 3px 6px; background: transparent; color: var(--ink); font: 800 1.1875rem/1 Overpass, system-ui, sans-serif; }
.sp-slot input::placeholder { color: #66717b; opacity: 1; font-weight: 700; }
.sp-slot input:focus-visible { outline-offset: -3px; }
.sp-go { height: 3rem; padding-inline: 1.125rem; border: 0; border-radius: 3px 3px 6px 3px; background: var(--yellow); color: var(--ink); font-weight: 800; white-space: nowrap; box-shadow: inset 0 0 0 2px var(--ink); transition: scale 200ms ease-out; }
.sp-go:disabled { background: #e3e6e9; color: #7b858e; box-shadow: none; cursor: default; }
.sp-note { padding-inline: 0.375rem; color: var(--white); font-weight: 600; text-wrap: pretty; }
.sp-note::first-letter { text-transform: uppercase; }
/* matching cities: a white panel that drops out of the bottom of the sign, over everything on the posts */
.sp-options { position: absolute; z-index: 5; inset-inline: 0; top: calc(100% - 0.5rem); margin: 0; padding: 0.3rem; border-radius: 0 0 12px 12px; background: var(--white); color: var(--ink); box-shadow: 0 16px 28px -8px rgb(10 30 60 / 0.6), 0 0 0 3px var(--sign); }
.sp-options li { display: flex; align-items: center; min-height: 2.75rem; padding-inline: 0.75rem; border-radius: 4px; font-weight: 800; cursor: pointer; }
.sp-options li[aria-selected="true"] { background: var(--yellow); }

/* beacons on the sign's top corners: dark until a right answer sets them flashing */
.sp-beacon { position: absolute; z-index: 2; top: -0.55rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #5b4a12; box-shadow: 0 0 0 3px var(--ink); }
.sp-beacon.l { left: -0.35rem; }
.sp-beacon.r { right: -0.35rem; }
.sp-sign.small .sp-beacon, .sp-sign.lost .sp-beacon { display: none; }
.sp-sign.won .sp-beacon { background: var(--yellow); box-shadow: 0 0 0 3px var(--ink), 0 0 14px 5px rgb(255 203 5 / 0.75); }

/* ---- furniture on the posts ---- */
/* fingerpost arms: a board cut to a point. "away" arms point left with a red slash: cities it is not. */
.sp-arms { display: grid; gap: 0.5rem; }
.sp-arms:empty { display: none; }
.sp-arm { position: relative; display: flex; align-items: center; min-height: 2.9rem; border: 0; font-weight: 800; font-size: 1.0625rem; line-height: 1.1; filter: drop-shadow(0 5px 5px rgb(10 30 60 / 0.35)); }
.sp-arm.away { justify-self: start; width: 72%; padding: 0.4rem 0.9rem 0.3rem 2.1rem; background: linear-gradient(172deg, transparent 47%, var(--red) 47% 55%, transparent 55%) var(--white); color: var(--ink); clip-path: polygon(1.4rem 0, 100% 0, 100% 100%, 1.4rem 100%, 0 50%); transform-origin: calc(var(--post) / 0.72) 50%; }
.sp-arm.onward { align-self: flex-end; justify-content: center; width: 72%; min-height: 3.6rem; padding: 0.4rem 2.4rem 0.3rem 1rem; background: var(--green); color: var(--white); font-size: 1.25rem; clip-path: polygon(0 0, calc(100% - 1.7rem) 0, 100% 50%, calc(100% - 1.7rem) 100%, 0 100%); transform-origin: calc(100% - var(--post) / 0.72) 50%; transition: scale 200ms ease-out; }
.sp-arm.onward::before { content: ""; position: absolute; inset: 5px 1.9rem 5px 5px; border: 2.5px solid var(--white); border-right: 0; }
.sp-arm.onward:focus-visible { outline: 0; filter: drop-shadow(0 0 0 var(--ink)) drop-shadow(0 0 3px var(--yellow)) drop-shadow(0 0 3px var(--yellow)); }
/* giving up is a stop sign on the right-hand post */
.sp-stop { align-self: flex-end; margin-right: calc(var(--post) - 2.4rem); width: 4.8rem; height: 4.8rem; border: 0; background: var(--red); color: var(--white); font-weight: 800; font-size: 1rem; line-height: 1.05; text-transform: uppercase; clip-path: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%); box-shadow: inset 0 0 0 4px var(--red), inset 0 0 0 6px var(--white); transition: scale 200ms ease-out; }
.sp-stop:focus-visible { outline: 0; box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 7px var(--yellow); }

.sp-sign.total .sp-face { grid-template-columns: minmax(0, 1fr); padding: 0; }
.sp-sign.total .sp-name { font-size: 2.5rem; font-variant-numeric: tabular-nums; }
.sp-sign.total small { font-size: 1.25rem; opacity: 0.7; }
.sp-sign.small .sp-face { padding: 0; }

.sp-road { position: relative; z-index: 2; height: 3rem; background: linear-gradient(90deg, #f1c40f 0 1.75rem, transparent 1.75rem 3.25rem) 0 50% / 3.25rem 4px repeat-x var(--asphalt); border-top: 4px solid #eef1f3; }

@media (prefers-reduced-motion: no-preference) {
  .sp-rig.drop { animation: sp-drop 1000ms cubic-bezier(0.2, 0, 0, 1) both; }
  .sp-sign.shake { animation: sp-shake 560ms ease-out both; }
  /* the announcement: the sign turns over slowly, then the answer is lettered in, the shield lands, the beacons flash */
  .sp-sign.turn { animation: sp-turn 1100ms cubic-bezier(0.3, 0, 0.1, 1) both; }
  .sp-answer.letter { animation: sp-letter 900ms cubic-bezier(0.2, 0, 0, 1) 800ms both; }
  .sp-shield.pulse { animation: sp-pulse 700ms cubic-bezier(0.2, 0, 0, 1) 1200ms both; }
  .sp-sign.won.turn .sp-beacon { animation: sp-flash 420ms steps(2, jump-none) 900ms 7 both; }
  .sp-tab.letter b { animation: sp-letter 700ms cubic-bezier(0.2, 0, 0, 1) both; }
  .sp-sign.turn .sp-tab.letter b { animation-delay: 700ms; }
  .sp-arm.swing { animation: sp-swing 800ms cubic-bezier(0.2, 0, 0, 1) both; }
  .sp-arm.swing.late { animation-delay: 1700ms; }
  .sp-go:not(:disabled):active, .sp-tab.blank:not(:disabled):active, .sp-arm.onward:active, .sp-stop:active { scale: 0.96; }
}
@keyframes sp-drop { from { transform: translateY(-45%) rotate(-2deg); opacity: 0; } 65% { transform: translateY(0) rotate(0.7deg); opacity: 1; } 85% { transform: rotate(-0.3deg); } }
@keyframes sp-shake { 15% { translate: -9px 0; } 35% { translate: 8px 0; } 55% { translate: -5px 0; } 75% { translate: 3px 0; } }
@keyframes sp-turn { 0% { transform: perspective(46rem) rotateX(0); filter: brightness(1); } 45% { transform: perspective(46rem) rotateX(-90deg); filter: brightness(0.6); } 46% { transform: perspective(46rem) rotateX(90deg); } 100% { transform: perspective(46rem) rotateX(0); filter: brightness(1); } }
@keyframes sp-letter { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes sp-pulse { from { scale: 1.9; opacity: 0; } 60% { scale: 0.92; opacity: 1; } }
@keyframes sp-flash { 50% { background: #5b4a12; box-shadow: 0 0 0 3px var(--ink); } }
@keyframes sp-swing { from { transform: rotate(-80deg); opacity: 0; } 60% { transform: rotate(5deg); opacity: 1; } 80% { transform: rotate(-2deg); } }
