:root {
  --bg: #000000;
  --card: #151517;
  --ink: #f4f4f6;
  --soft: rgba(244, 244, 246, 0.56);
  --line: rgba(244, 244, 246, 0.12);
  --accent: #6fe3b0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.mr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; width: min(348px, 100%); padding: 18px 16px 16px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 50px -30px rgba(0, 0, 0, 0.9); }
.mr__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 2px; }
.mr__title { display: grid; gap: 2px; min-width: 0; }
.mr__title span { font-size: 12px; line-height: 15px; font-weight: 620; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr__title strong { font-size: 18px; line-height: 22px; font-weight: 740; letter-spacing: -0.012em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr__pill { flex: none; display: grid; place-items: center; height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12.500px; font-weight: 720; white-space: nowrap; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); transition: background-color 0.35s ease, color 0.35s ease; }
.mr__pill.is-fixed { background: var(--accent); color: #0b1410; }
.mr__clip { display: block; height: 16px; line-height: 16px; overflow: hidden; }
.mr__clip span { display: block; }

/* the route: the drawing on top, and over it four buttons, one per stop, each with its name underneath */
.mr__track { position: relative; }
.mr__track svg { display: block; width: 100%; height: auto; overflow: visible; }
.mr__rail { stroke: var(--line); stroke-width: 2; stroke-linecap: round; }
.mr__done { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.mr__dot { fill: #2c2c30; stroke: var(--card); stroke-width: 2; transition: fill 0.3s ease; }
.is-on .mr__dot { fill: var(--accent); }
.mr__check { fill: none; stroke: #0b1410; stroke-width: 1.900; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.mr__ring { fill: none; stroke: var(--accent); stroke-width: 1.600; }
.mr__peek { fill: none; stroke: var(--ink); stroke-opacity: 0.5; stroke-width: 1.200; stroke-dasharray: 2.400 3.200; opacity: 0; }
.mr__stops { position: absolute; inset: 0 0 auto 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mr__stop { display: grid; align-content: end; justify-items: center; height: 54px; padding: 0 0 2px; border-radius: 12px; font-size: 11.500px; line-height: 16px; font-weight: 660; color: var(--soft); white-space: nowrap; transition: color 0.25s ease; }
.mr__stop.is-on { color: var(--ink); }
.mr__stop.is-peek { color: var(--ink); }
.mr__stop:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.mr__track { padding-bottom: 22px; }

.mr__detail { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: rgba(244, 244, 246, 0.05); box-shadow: inset 0 0 0 1px rgba(244, 244, 246, 0.05); }
.mr__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.mr__icon svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.600; stroke-linecap: round; stroke-linejoin: round; }
.mr__icon g { opacity: 0; }
.mr__icon g path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.mr__text { display: grid; gap: 2px; min-width: 0; }
.mr__text b { font-size: 13.500px; line-height: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr__text i { font-style: normal; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

.mr__btn { display: flex; justify-content: center; align-items: center; gap: 7px; height: 46px; border-radius: 23px; background: var(--ink); color: #0c0c0e; font-size: 14.500px; font-weight: 730; white-space: nowrap; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 14px 20px -12px rgba(244, 244, 246, 0.35); }
.mr__btn svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mr__btn:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #ffffff; stroke: #0c0c0e; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); z-index: 6; }

@media (hover: hover) { .mr__stop:hover { color: var(--ink); } }
@media (max-width: 350px) { .mr { padding: 16px 13px 14px; gap: 12px; } .mr__stop { font-size: 11px; } .mr__text b { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .mr__pill, .mr__dot, .mr__stop { transition: none; } }
