:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #16161b;
  --soft: rgba(22, 22, 27, 0.56);
  --line: rgba(22, 22, 27, 0.09);
  --empty: #eeedf0;
  --accent: #e8871e;
  --paid: #1d9a5b;
  --urgent: #d9452b;
}

*, *::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 16px;
}

/* --tone is the card's colour: amber while the fine is due, green once it is paid */
.mf {
  --tone: var(--accent);
  width: min(318px, 100%);
  padding: 14px 15px 15px;
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(22, 22, 27, 0.05), 0 34px 60px -36px color-mix(in srgb, var(--tone) 55%, transparent);
}

.mf__head { display: flex; align-items: center; gap: 10px; }
.mf__sign { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--tone) 13%, #ffffff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent); }
.mf__sign svg { width: 20px; height: 20px; fill: none; stroke: color-mix(in srgb, var(--tone) 86%, #16161b); stroke-width: 2.300; stroke-linecap: round; stroke-linejoin: round; }
.mf__who { display: flex; flex-direction: column; min-width: 0; }
.mf__who b { font-size: 14.5px; line-height: 18px; font-weight: 680; font-stretch: 106%; letter-spacing: -0.006em; }
.mf__who > span { font-size: 11.5px; line-height: 16px; font-weight: 540; color: var(--soft); white-space: nowrap; }
.mf__state { margin-left: auto; height: 24px; padding: 0 10px; border-radius: 12px; background: color-mix(in srgb, var(--tone) 13%, #ffffff); color: color-mix(in srgb, var(--tone) 80%, #16161b); font-size: 11.5px; line-height: 24px; font-weight: 700; }
.mf__state-word { display: block; height: 24px; overflow: hidden; }
.mf__state-word span { display: block; }

.mf__car { display: flex; align-items: center; gap: 8px; margin-top: clamp(8px, 2.200vh, 12px); }
.mf__plate { display: flex; align-items: stretch; height: 21px; border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(22, 22, 27, 0.2); font-size: 11px; line-height: 21px; font-weight: 700; font-stretch: 88%; letter-spacing: 0.06em; }
.mf__plate i { width: 7px; background: #2f56b8; }
.mf__plate span { padding: 0 6px; }
.mf__why { font-size: 11.5px; font-weight: 560; color: var(--soft); white-space: nowrap; }

.mf__amount { display: flex; align-items: baseline; gap: 8px; margin-top: clamp(6px, 2vh, 12px); }
.mf__num { font-size: clamp(30px, 9vh, 38px); line-height: 1.1; font-weight: 400; letter-spacing: -0.035em; font-variation-settings: "wght" 640, "wdth" 96; }
.mf__full { position: relative; font-size: 13px; font-weight: 600; color: var(--soft); }
.mf__strike { position: absolute; left: -2px; right: -2px; top: 52%; height: 1.500px; border-radius: 1px; background: currentColor; transform-origin: 0 50%; }
.mf__off { margin-left: auto; align-self: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--ink); color: #ffffff; font-size: 11px; line-height: 20px; font-weight: 700; }

.mf__window { margin-top: clamp(6px, 1.800vh, 10px); }
.mf__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 18px; font-size: 11.5px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.mf__left { display: block; height: 18px; overflow: hidden; line-height: 18px; color: color-mix(in srgb, var(--tone) 82%, #16161b); font-weight: 700; }
.mf__left span { display: block; }
.mf.is-urgent .mf__left { color: var(--urgent); }

/* five days, one segment each: the part already gone is ink, what is left is the tone */
.mf__days { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; height: 26px; margin-top: 5px; padding: 8px 0; cursor: default; touch-action: pan-y; }
.mf__seg { position: relative; height: 10px; border-radius: 4px; background: color-mix(in srgb, var(--tone) 42%, #ffffff); overflow: hidden; transform-origin: 50% 50%; }
.mf__seg i { position: absolute; inset: 0; border-radius: inherit; background: #c9c8cf; transform-origin: 0 50%; }
.mf.is-paid .mf__seg i { background: var(--tone); }
.mf__tip {
  position: absolute;
  left: 0;
  bottom: calc(100% - 2px);
  display: flex;
  align-items: baseline;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  box-shadow: 0 0 0 1px rgba(22, 22, 27, 0.08), 0 8px 20px -8px rgba(22, 22, 27, 0.28);
  font-size: 11.5px;
  line-height: 26px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.mf__tip b { font-weight: 700; }
.mf__tip span { font-weight: 600; color: var(--soft); }

.mf__pay {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  margin-top: clamp(8px, 2.400vh, 13px);
  border: 0;
  border-radius: 22px;
  background: var(--ink);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.4s ease;
}
.mf.is-paid .mf__pay { cursor: default; }
/* the green washes in from the icon, a circle that opens across the button */
.mf__wash { position: absolute; inset: 0; z-index: -1; background: var(--tone); clip-path: circle(0 at 50% 50%); }
.mf__fill { position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, 0.16); transform: scaleX(0); transform-origin: 0 50%; }
.mf__icon { width: 18px; height: 18px; flex: none; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.600; stroke-linecap: round; stroke-linejoin: round; }
.mf__spin { stroke-dasharray: 0.3 1; stroke-width: 1.900; opacity: 0; transform-origin: 10px 10px; }
.mf__tick { stroke-width: 2.100; stroke-dasharray: 1; stroke-dashoffset: 1; }
.mf__label { display: block; height: 20px; overflow: hidden; font-size: 14px; line-height: 20px; font-weight: 660; font-stretch: 104%; white-space: nowrap; }
.mf__label span { display: block; }
.mf__pay:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--tone); }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #16161b;
  stroke: #ffffff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(22, 22, 27, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (hover: hover) {
  .mf__pay:hover { background: #2c2c34; }
  .mf.is-paid .mf__pay:hover { background: var(--ink); }
}
