/* Baskervville = Baskerville face for plate number/region (canvas + UI). */
@font-face {
  font-family: Baskervville;
  src: url('/fonts/Baskervville/static/Baskervville-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Baskervville;
  src: url('/fonts/Baskervville/static/Baskervville-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Lining + tabular figures so digits match capital letter height (not oldstyle). */
@font-face {
  font-family: BaskervvillePlate;
  src: url('/fonts/Baskervville/static/Baskervville-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

/* Reserved for later (not used on plates yet). */
@font-face {
  font-family: AlgeriaTwo;
  src: url('/fonts/algeriatwo.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.tpeRoot { margin-top: 14px; }

.tpe {
  display: grid;
  grid-template-columns: min(280px, 36%) 1fr;
  gap: 14px;
  align-items: start;
}

.tpeControls {
  display: grid;
  gap: 8px;
}

.tpeLabel {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: inherit;
  opacity: .85;
}

.tpeInput {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid rgba(127,127,127,.35);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
}

.tpeChecks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12px;
}

.tpeField {
  display: grid;
  grid-template-columns: 28px 1fr 44px;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.tpeField span {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tpeHint {
  margin: 0;
  font-size: 12px;
  opacity: .65;
  line-height: 1.35;
}

.tpeBtn {
  appearance: none;
  border: 1px solid rgba(127,127,127,.4);
  background: transparent;
  color: inherit;
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  cursor: pointer;
}

.tpeCorners {
  margin: 6px 0 0;
  padding-left: 18px;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: .8;
}

.tpeJson {
  margin: 0;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(127,127,127,.25);
  font: 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 140px;
  overflow: auto;
  opacity: .85;
}

.tpePreview {
  min-width: 0;
}

.tpePreview canvas {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
  background: #111;
  cursor: crosshair;
  touch-action: none;
}

.tpeStatus {
  margin: 8px 0 0;
  font-size: 12px;
  opacity: .7;
}

@media (max-width: 860px) {
  .tpe { grid-template-columns: 1fr; }
}
