@font-face {
  font-family: "Outfit";
  src: url("/assets/Outfit-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GL Nummernschild";
  src: url("/assets/GL-Nummernschild-Mtl.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GL Nummernschild Eng";
  src: url("/assets/GL-Nummernschild-Eng.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --kfz-orange: #ef4b0b;
  --kfz-orange-dark: #a92f08;
  --kfz-petrol: #0b9395;
  --kfz-petrol-dark: #08656a;
  --kfz-cream: #f5e4c6;
  --kfz-ink: #11100f;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-200%);
  background: var(--kfz-ink);
  color: #fff;
  padding: 0.65rem 0.85rem;
}

.skip-link:focus { transform: translateY(0); }

.shop-test {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 90% 10%, rgba(11, 147, 149, 0.12), transparent 26rem),
    var(--kfz-cream);
  color: var(--kfz-ink);
  font-family: "Outfit", system-ui, sans-serif;
  padding: 1.25rem;
}

.shop-shell {
  width: min(70rem, 100%);
  margin: 0 auto;
}

.shop-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem 2rem;
}

.shop-topbar img {
  display: block;
  width: min(15rem, 55vw);
  height: auto;
}

.shop-back {
  color: var(--kfz-petrol-dark);
  font-weight: 700;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.25em;
}

.sandbox-flag {
  display: inline-flex;
  border: 1px solid var(--kfz-orange);
  padding: 0.42rem 0.62rem;
  color: var(--kfz-orange-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sandbox-flag[hidden] { display: none; }

.shop-heading {
  max-width: 48rem;
  margin: 1rem 0 2rem;
}

.shop-heading h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.shop-heading p {
  max-width: 58ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
}

.kfz-page__section--shop {
  padding-top: clamp(1.15rem, 2.4vw, 2rem);
  background:
    radial-gradient(circle at 90% 0%, rgba(11, 147, 149, 0.12), transparent 24rem),
    var(--kfz-paper);
}

.kfz-page__section--answer {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  background: var(--kfz-cream);
}

.kfz-page__section--answer h2 {
  max-width: 17ch;
  margin: 0.8rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.kfz-page__section--answer p {
  max-width: 72ch;
  margin: 0;
  color: var(--kfz-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.kfz-page__faq a {
  color: var(--kfz-petrol-dark);
  font-weight: 800;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

.kfz-page__print-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.35rem 1rem;
  margin-top: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--kfz-line);
  background: #fff;
}

.kfz-page__print-link small {
  grid-column: 1;
  color: var(--kfz-orange-dark);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kfz-page__print-link strong { grid-column: 1; }
.kfz-page__print-link span { grid-column: 2; grid-row: 1 / 3; color: var(--kfz-orange); font-size: 1.5rem; }

.shop-heading--direct {
  max-width: none;
  margin: 0 0 clamp(1rem, 2vw, 1.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.7fr);
  column-gap: 2rem;
  align-items: end;
}

.shop-heading--direct .kfz-status {
  grid-column: 1 / -1;
  margin-bottom: 0.7rem;
}

.shop-heading--direct h1 {
  margin: 0;
  font-size: clamp(2rem, 4.1vw, 3.9rem);
  line-height: 0.96;
  letter-spacing: -0.052em;
}

.shop-heading--direct p {
  max-width: 48ch;
  font-size: 0.98rem;
  line-height: 1.5;
}

.shop-intro {
  display: grid;
  gap: 0.85rem;
  align-self: end;
}

.cert-proof {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(17, 16, 15, 0.18);
  border-bottom: 1px solid rgba(17, 16, 15, 0.18);
  color: var(--kfz-ink);
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.cert-proof:hover,
.cert-proof:focus-visible {
  border-color: var(--kfz-petrol);
  color: var(--kfz-petrol-dark);
}

.cert-proof:focus-visible {
  outline: 3px solid rgba(11, 147, 149, 0.24);
  outline-offset: 4px;
}

.cert-proof__mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 1px solid var(--kfz-petrol);
  border-radius: 50%;
  color: var(--kfz-petrol-dark);
  font-size: 1rem;
  font-weight: 900;
}

.cert-proof__copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.cert-proof__copy small {
  color: var(--kfz-orange-dark);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.cert-proof__copy strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.cert-proof__copy > span {
  color: var(--kfz-muted);
  font-size: 0.77rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.cert-proof__link {
  color: var(--kfz-petrol-dark);
  font-size: 0.71rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(22rem, 0.9fr) minmax(24rem, 1.1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
}

.checkout-layout > *,
.shop-heading,
.shop-topbar > * {
  min-width: 0;
}

.checkout-form,
.checkout-summary,
.payment-status {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 16, 15, 0.12);
  box-shadow: 0 1.25rem 3.5rem rgba(80, 47, 25, 0.12);
}

.checkout-form {
  padding: clamp(1.1rem, 3vw, 2rem);
}

.checkout-form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.65rem;
}

.checkout-form legend,
.field-label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.field-grid {
  display: grid;
  grid-template-columns: 0.36fr 0.64fr;
  gap: 0.75rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.contact-grid > label:last-child { grid-column: 1 / -1; }

.checkout-form input,
.checkout-form select {
  width: 100%;
  min-height: 3.2rem;
  border: 1px solid rgba(17, 16, 15, 0.28);
  border-radius: 0.3rem;
  background: #fffdf8;
  color: var(--kfz-ink);
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.checkout-form input:focus-visible,
.checkout-form select:focus-visible,
.checkout-form button:focus-visible,
.shop-back:focus-visible {
  outline: 3px solid rgba(11, 147, 149, 0.5);
  outline-offset: 3px;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.choice-row--types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-row--formats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span {
  position: relative;
  display: block;
  border: 2px solid rgba(17, 16, 15, 0.18);
  border-radius: 0.3rem;
  padding: 0.9rem 0.9rem 2rem;
  background: #fffdf8;
  font-weight: 750;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.choice span::after {
  content: "";
  position: absolute;
  right: 0.72rem;
  bottom: 0.48rem;
  color: var(--kfz-petrol-dark);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.choice--type span { min-height: 5.2rem; text-align: left; }
.choice--type strong,
.choice--type small,
.choice--format strong,
.choice--format small { display: block; }
.choice--type strong { margin-bottom: 0.3rem; }
.choice--type small { color: rgba(17, 16, 15, 0.66); font-size: 0.76rem; line-height: 1.35; }
.choice--format span { min-height: 5.65rem; padding-inline: 0.55rem; text-align: left; }
.choice--format strong { margin-bottom: 0.2rem; font-size: 1rem; }
.choice--format small { color: rgba(17, 16, 15, 0.66); font-size: 0.68rem; line-height: 1.25; }

.season-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(11, 147, 149, 0.28);
  background: rgba(11, 147, 149, 0.07);
}

.season-fields[hidden] { display: none; }
.position-help { display: block; margin-top: 0.45rem; color: var(--kfz-petrol-dark); font-weight: 750; }
.position-help[data-state="error"] { color: var(--kfz-orange-dark); }

.choice input:checked + span {
  border-color: var(--kfz-petrol-dark);
  background: rgba(11, 147, 149, 0.13);
  box-shadow: inset 0 -0.22rem 0 rgba(11, 147, 149, 0.18), 0 0.3rem 0.8rem rgba(8, 101, 106, 0.08);
}

.choice input:checked + span::after { content: "Ausgewählt"; }

@media (hover: hover) {
  .choice:hover span {
    transform: translateY(-1px);
    border-color: rgba(8, 101, 106, 0.62);
  }
}

.choice input:focus-visible + span {
  outline: 3px solid rgba(11, 147, 149, 0.5);
  outline-offset: 3px;
}

.confirm-row[hidden] { display: none; }

.confirm-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  margin: 0 0 1.4rem;
  line-height: 1.5;
}

.confirm-row input {
  width: 1.15rem;
  min-height: auto;
  height: 1.15rem;
  margin-top: 0.15rem;
}

.checkout-legal {
  margin: -0.25rem 0 1.1rem;
  color: rgba(17, 16, 15, 0.72);
  font-size: 0.82rem;
  line-height: 1.55;
}

.checkout-legal a {
  color: var(--kfz-petrol-dark);
  font-weight: 750;
  text-underline-offset: 0.18em;
}

.payment-methods {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border-left: 0.25rem solid var(--kfz-petrol);
  background: rgba(11, 147, 149, 0.08);
  color: rgba(17, 16, 15, 0.82);
  font-size: 0.8rem;
  line-height: 1.45;
}

.payment-methods strong { color: var(--kfz-ink); }

.checkout-submit {
  width: 100%;
  min-height: 3.4rem;
  border: 0;
  border-radius: 0.25rem;
  background: var(--kfz-orange);
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.checkout-submit:hover { background: var(--kfz-orange-dark); }
.checkout-submit:active { transform: translateY(1px) scale(0.99); }
.checkout-submit:disabled { cursor: wait; opacity: 0.68; }
.checkout-form[data-checkout-mode="preview"] .checkout-submit:disabled { cursor: not-allowed; }

.form-message {
  min-height: 1.5rem;
  margin: 0.8rem 0 0;
  color: var(--kfz-orange-dark);
  font-weight: 700;
}

.checkout-summary {
  position: sticky;
  top: 1rem;
  padding: clamp(1.25rem, 3vw, 2.2rem);
  background: var(--kfz-ink);
  color: var(--kfz-cream);
}

.plate-preview {
  display: grid;
  grid-template-columns: var(--plate-eu-ratio, 8.6538%) 1fr;
  align-items: center;
  width: 100%;
  aspect-ratio: 520 / 110;
  margin: 0 auto 2rem;
  border: 0.32rem double #292929;
  border-radius: 0.45rem;
  background: #f7f7f2;
  color: #111;
  overflow: hidden;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.28);
}

.plate-preview--editable { margin-bottom: 0.85rem; }

.plate-district-input,
.plate-code-input {
  min-width: 0;
  height: 84%;
  border: 0.018em solid #202020;
  border-radius: 0.055em;
  outline: 0;
  background: #fff;
  color: #111;
  font: inherit;
  font-weight: inherit;
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 0.018em 0.04em rgba(0, 0, 0, 0.08);
}

.plate-district-input {
  flex: 0 0 29%;
  width: 29%;
  padding: 0 0.04em;
  -webkit-appearance: none;
  appearance: none;
  cursor: text;
}

.plate-district-input::-webkit-calendar-picker-indicator,
.plate-district-input::-webkit-list-button {
  display: none !important;
  width: 0;
  height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.plate-code-input { padding: 0 0.04em; }
.plate-letters-input { flex: 0 1 42%; width: 42%; }
.plate-digits-input { flex: 1 1 52%; width: 52%; }
.plate-code-input::placeholder { color: rgba(17, 17, 17, 0.27); opacity: 1; }
.plate-district-input:focus-visible,
.plate-code-input:focus-visible {
  border-color: var(--kfz-orange);
  box-shadow: 0 0 0 0.04em rgba(239, 75, 11, 0.35);
}

.plate-input-help,
.checkout-summary .position-help {
  display: block;
  color: rgba(245, 228, 198, 0.76);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.checkout-summary .position-help { margin-top: 0.3rem; color: #8ee1df; }
.checkout-summary .position-help[data-state="error"] { color: #ff9f78; }

.plate-eu {
  align-self: stretch;
  position: relative;
  display: block;
  box-sizing: border-box;
  background: #064aa1;
  color: white;
  padding: 0;
  font-size: clamp(0.72rem, calc(var(--plate-font-size, 5rem) * 0.13), 1rem);
  line-height: 1;
  font-weight: 800;
}

.plate-eu > span {
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%);
  line-height: 1;
}

.plate-number {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.04em;
  padding: 0 0.08em;
  font-family: "GL Nummernschild", "Arial Narrow", sans-serif;
  font-size: var(--plate-font-size, 5rem);
  font-weight: 400;
  line-height: 0.72;
  letter-spacing: 0;
  white-space: nowrap;
}

.plate-preview[data-font-style="narrow"] .plate-number {
  font-family: "GL Nummernschild Eng", "Arial Narrow", sans-serif;
}

.plate-seals {
  flex: 0 0 0.36em;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.02em;
}

.plate-seal {
  display: block;
  border: 0.015em solid rgba(17, 17, 17, 0.34);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, rgba(255,255,255,.9), rgba(0,0,0,.08) 72%);
}

.plate-seal--small { width: 0.28em; height: 0.28em; }
.plate-seal--large { width: 0.36em; height: 0.36em; }

.plate-serial {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.07em;
}

.plate-suffix {
  flex: 0 0 auto;
  display: inline-block;
  margin-left: 0.06em;
  font-size: 0.78em;
  line-height: 1;
}

.plate-season {
  flex: 0 0 10%;
  width: 10%;
  height: 84%;
  margin-left: 0.035em;
  align-self: center;
  display: inline-grid;
  grid-template-rows: 1fr auto 1fr;
  place-items: center;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.27em;
  font-weight: 800;
  line-height: 0.9;
}

.plate-season[hidden] { display: none; }
.plate-season i { width: 0.9em; height: 0.12em; background: currentColor; }

.price-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(245, 228, 198, 0.28);
}

.price-line strong {
  color: var(--kfz-cream);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.checkout-summary ul {
  margin: 1.5rem 0 0;
  padding-left: 1.15rem;
  color: rgba(245, 228, 198, 0.78);
  line-height: 1.7;
}

.payment-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100dvh - 9rem);
  place-items: center;
}

.payment-status {
  width: 100%;
  max-width: 36rem;
  min-width: 0;
  padding: clamp(1.5rem, 5vw, 3.5rem);
}

.status-mark {
  width: 3.5rem;
  height: 0.45rem;
  margin-bottom: 1.5rem;
  background: var(--kfz-orange);
}

.payment-status[data-state="paid"] .status-mark { background: var(--kfz-petrol); }
.payment-status h1 { margin: 0 0 0.8rem; overflow-wrap: anywhere; font-size: clamp(2rem, 6vw, 3.8rem); letter-spacing: -0.045em; }
.payment-status p { line-height: 1.6; }
.status-details { font-weight: 750; }

.shop-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 2rem 1rem;
  color: rgba(17, 16, 15, 0.7);
  font-size: 0.86rem;
}

.shop-footer a { color: inherit; }

@media (max-width: 760px) {
  .shop-test { padding: 0.85rem; }
  .shop-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .shop-topbar img { width: min(12.5rem, 52vw); }
  .shop-back {
    max-width: 40%;
    overflow-wrap: anywhere;
    text-align: right;
  }
  .shop-heading h1 { overflow-wrap: anywhere; }
  .kfz-page__section--shop { padding-top: 1rem; }
  .shop-heading--direct {
    display: block;
    margin-bottom: 0.9rem;
  }
  .shop-heading--direct .kfz-status { margin-bottom: 0.65rem; }
  .shop-heading--direct h1 {
    font-size: clamp(1.85rem, 9vw, 2.65rem);
    line-height: 1;
  }
  .shop-heading--direct p {
    margin-top: 0.55rem;
    font-size: 0.86rem;
    line-height: 1.4;
  }
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary {
    position: static;
    grid-row: 1;
    overflow: hidden;
    padding: 0.65rem;
  }
  .checkout-summary ul { display: none; }
  .price-line { padding-top: 0.8rem; }
  .field-grid { grid-template-columns: 0.42fr 0.58fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid > label:last-child { grid-column: auto; }
}

@media (max-width: 480px) {
  .shop-topbar {
    flex-direction: column;
  }
  .shop-back {
    max-width: 100%;
    text-align: left;
  }
  .checkout-summary { width: 100%; }
  .checkout-summary li { overflow-wrap: anywhere; }
  .price-line { gap: 0.5rem; }
  .price-line strong { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
