.public-price-normalizer {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

.normalizer-card {
  border-radius: 26px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
  padding: 1.75rem 2rem;
  backdrop-filter: blur(8px);
}

.normalizer-form .du-input,
.normalizer-form .du-select {
  min-height: 3rem;
}

.normalizer-input-prefix {
  position: relative;
}

.normalizer-input-prefix > span {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: hsl(var(--bc, 220 15% 15%) / 0.55);
  pointer-events: none;
}

.normalizer-input-prefix input {
  padding-left: 2.75rem !important;
  font-variant-numeric: tabular-nums;
}

.normalizer-progress {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  z-index: 30;
}

.normalizer-progress__bar {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.3s ease;
  background-image: linear-gradient(90deg, hsl(var(--p, 220 70% 55%)), hsl(var(--s, 255 60% 55%)));
}

.normalizer-progress.is-active .normalizer-progress__bar {
  transform: scaleX(1);
  animation: normalizer-progress-loop 1.4s ease-in-out infinite;
}

@keyframes normalizer-progress-loop {
  0% {
    transform: scaleX(0.1);
  }
  50% {
    transform: scaleX(0.7);
  }
  100% {
    transform: scaleX(0.1);
  }
}

.insight-card {
  border-left: 4px solid hsl(var(--p, 220 70% 55%));
  padding: 1.75rem 2rem;
}

.insight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
  color: #fff;
}

.insight-chips .chip-placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.insight-body {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insight-body h3 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--bc, 220 15% 15%) / 0.6);
}

.insight-body p {
  margin: 0;
}

.normalizer-chart {
  position: relative;
  height: 420px;
}

.skeleton-chart {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(229, 231, 235, 0.6), rgba(203, 213, 225, 0.95), rgba(229, 231, 235, 0.6));
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-text {
  display: inline-block;
  min-width: 120px;
  height: 0.85rem;
  border-radius: 0.25rem;
  background: linear-gradient(
    90deg,
    hsl(var(--s, 255 60% 55%) / 0.45),
    hsl(var(--s, 255 60% 55%) / 0.85),
    hsl(var(--s, 255 60% 55%) / 0.45)
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.normalizer-chip {
  --chip-border: rgba(15, 23, 42, 0.12);
  --chip-color: hsl(var(--p, 220 70% 55%));
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  padding: 0.75rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--chip-color);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  box-shadow: 0 0.35rem 0.8rem rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.normalizer-chip .chip-label,
.normalizer-chip .chip-value {
  color: inherit;
}

.normalizer-chip .chip-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.normalizer-chip:hover,
.normalizer-chip:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.5rem 1.2rem rgba(15, 23, 42, 0.22);
}

.normalizer-chip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.normalizer-chip--aiqs { --chip-color: #0d6efd; }
.normalizer-chip--rawlinsons { --chip-color: #ff7f0e; }
.normalizer-chip--cpi { --chip-color: #198754; }
.normalizer-chip--cpi-housing { --chip-color: #6f42c1; }
.normalizer-chip--ihc { --chip-color: #0dcaf0; }
.normalizer-chip--wpi { --chip-color: #d63384; }
.normalizer-chip--west-edge {
  --chip-color: #111827;
  color: #f8fafc;
}

.weight-slider {
  width: 100%;
  accent-color: hsl(var(--p, 220 70% 55%));
}
.normalizer-chip--balanced,
.normalizer-chip--inflation-guard,
.normalizer-chip--housing-focus { --chip-color: #475569; }

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--p, 220 70% 55%) / 0.3);
  background-color: hsl(var(--p, 220 70% 55%) / 0.12);
  color: hsl(var(--p, 220 70% 55%));
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
}

.badge-soft.is-invalid {
  background-color: hsl(var(--er, 5 80% 58%) / 0.18);
  border-color: hsl(var(--er, 5 80% 58%) / 0.38);
  color: hsl(var(--er, 5 80% 58%));
}

.badge-mono {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background-color: hsl(var(--bc, 220 15% 15%) / 0.12);
  color: hsl(var(--bc, 220 15% 15%));
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
}

.weight-row {
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background-color: rgba(248, 250, 252, 0.9);
  padding: 0.85rem 1.25rem;
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) minmax(220px, 1.5fr);
  gap: 1.1rem;
  align-items: center;
}

.weight-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  color: hsl(var(--bc, 220 15% 15%));
}

.weight-name {
  font-size: 0.95rem;
}

.weight-description {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.weight-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip-placeholder,
.preset-empty {
  color: hsl(var(--bc, 220 15% 15%) / 0.6);
  font-size: 0.75rem;
}

.normalizer-methods code {
  white-space: normal;
  word-break: break-word;
}

.method-formula-box {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background-color: rgba(248, 250, 252, 0.9);
  padding: 1rem 1.25rem;
}

.normalizer-disclaimer ul {
  margin: 0;
}


@media (max-width: 1023px) {
  .normalizer-card {
    padding: 1.5rem;
  }
}

@media (max-width: 900px) {
  .weight-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .weight-label {
    justify-content: space-between;
  }

  .weight-description {
    font-size: 0.75rem;
  }
}
