/* /credit/ landing page */

/* Hero: crimson "steel sheet" with fine diagonal rolling lines */
.credit-hero {
  background-color: #7f0031;
  background-image: repeating-linear-gradient(
      -38deg,
      rgba(255, 255, 255, 0.05) 0 1px,
      transparent 1px 14px
    ),
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0) 55%);
}

.credit-plate {
  background: linear-gradient(145deg, #f7f3ed 0%, #e6ddd0 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 24px 48px -16px rgba(40, 0, 15, 0.55);
}

/* Steps rail: line connecting the step markers (desktop) */
.credit-steps-rail::before {
  content: "";
  position: absolute;
  top: 22px;
  right: 22px;
  /* end at the last marker: 4 columns, 3 gaps of 2rem, marker radius 23px */
  left: calc((100% - 6rem) / 4 - 23px);
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    #d9cdbd 0 8px,
    transparent 8px 14px
  );
}

.credit-page label.error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #da0c3a;
}
.credit-page input.error,
.credit-page select.error {
  border-color: #da0c3a;
}

/* FAQ */
.credit-faq summary {
  list-style: none;
}
.credit-faq summary::-webkit-details-marker {
  display: none;
}
.credit-faq-item {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.credit-faq-item:hover {
  border-color: #d9cdbd;
}
.credit-faq-item[open] {
  border-color: rgba(157, 0, 61, 0.28);
  box-shadow: 0 12px 32px -18px rgba(127, 0, 49, 0.35);
}
.credit-faq-icon {
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.credit-faq-item[open] .credit-faq-icon {
  transform: rotate(180deg);
  background: #9d003d;
  color: #fff;
}
.credit-faq-item[open] .credit-faq-answer {
  animation: credit-faq-in 0.22s ease-out;
}
@keyframes credit-faq-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Product hero: drafting sheet with a fine grid behind the cross-section */
.credit-drawing {
  background-color: #fbf9f6;
  background-image: linear-gradient(rgba(157, 0, 61, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 0, 61, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* Result popup (native <dialog>) */
.credit-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  max-height: none;
  overflow: visible;
}
.credit-dialog::backdrop {
  background: rgba(30, 37, 43, 0.55);
  backdrop-filter: blur(2px);
}
.credit-dialog[open] {
  animation: credit-dialog-in 0.22s ease-out;
}
.credit-dialog[data-state="success"] .credit-dialog-error,
.credit-dialog[data-state="error"] .credit-dialog-success {
  display: none;
}
@keyframes credit-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}

.credit-page a:focus-visible,
.credit-page button:focus-visible,
.credit-page summary:focus-visible {
  outline: 2px solid #9d003d;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .credit-page *,
  .credit-page *::before {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
