:root { --plate-h: 4.25rem; }

.plate {
  display: flex;
  height: var(--plate-h);
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}

.plate:focus-within { outline: 2px solid var(--plate); outline-offset: 2px; }

.band {
  flex: 0 0 calc(var(--plate-h) * .53);
  background: var(--plate);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  font: 600 calc(var(--plate-h) * .19)/1 "IBM Plex Mono", monospace;
  overflow: hidden;
  transition: flex-basis .2s ease;
}

.band::before {
  content: "";
  width: calc(var(--plate-h) * .22);
  aspect-ratio: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cg fill='%23FFCC00'%3E%3Ccircle cx='10' cy='3' r='.9'/%3E%3Ccircle cx='13.5' cy='3.94' r='.9'/%3E%3Ccircle cx='16.06' cy='6.5' r='.9'/%3E%3Ccircle cx='17' cy='10' r='.9'/%3E%3Ccircle cx='16.06' cy='13.5' r='.9'/%3E%3Ccircle cx='13.5' cy='16.06' r='.9'/%3E%3Ccircle cx='10' cy='17' r='.9'/%3E%3Ccircle cx='6.5' cy='16.06' r='.9'/%3E%3Ccircle cx='3.94' cy='13.5' r='.9'/%3E%3Ccircle cx='3' cy='10' r='.9'/%3E%3Ccircle cx='3.94' cy='6.5' r='.9'/%3E%3Ccircle cx='6.5' cy='3.94' r='.9'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.plate input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 var(--s3);
  color: inherit;
  font: 800 calc(var(--plate-h) * .53)/1 "Archivo", sans-serif;
  font-stretch: 78%;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "zero" 1;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

.plate input:focus { outline: none; }
/* opacity kvůli Firefoxu, který na placeholder jinak nasadí vlastní 0.54 a srazí kontrast */
.plate input::placeholder { color: var(--muted); opacity: 1; text-transform: none; }

.plate.vin { border-color: var(--rule-strong); background: var(--wash); }
.plate.vin .band { flex-basis: 0; }
.plate.vin input { font-size: calc(var(--plate-h) * .32); font-stretch: 90%; letter-spacing: .08em; }
