:where(.qq) {
  --qq-primary: #222222;
  --qq-primary-contrast: #ffffff;
  --qq-text: #222222;
  --qq-muted: #6b7280;
  --qq-border: #d1d5db;
  --qq-field: #ffffff;
  --qq-tint: #f5f5f5;
  --qq-track: #d1d5db;
  --qq-error: #c62828;
  --qq-error-tint: #fdecea;
  --qq-radius: 8px;
  --qq-button-radius: 8px;
  --qq-max-width: 832px;  
  max-width: var(--qq-max-width);
  margin: 32px auto 0;
  color: var(--qq-text);
  text-align: left;
}

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

.qq .qq-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.qq-head {
  text-align: center;
}

.qq-eyebrow {
  margin: 0 0 12px;
  color: var(--qq-muted);
  font-size: 14px;
  text-align: center;
  text-transform: uppercase;
}

.qq-title {
  margin: 0 auto 24px;
  color: var(--qq-text);
  font-size: 26px;
  line-height: 1.2;
  outline: none;
}

.qq-progress {
  display: flex;
  gap: 8px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.qq-seg {
  flex: 1 1 0;
  min-width: 0;
}

.qq-seg > button,
.qq-seg > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--qq-track);
  font: inherit;
}

.qq-seg > button {
  cursor: pointer;
}

.qq-seg-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.qq-seg-bar {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--qq-track);
}

.qq-seg.is-current > span,
.qq-seg.is-done > button,
.qq-seg.is-done > span {
  color: var(--qq-primary);
}

.qq-seg.is-current .qq-seg-bar,
.qq-seg.is-done .qq-seg-bar {
  background: var(--qq-primary);
}

.qq-seg > button:hover .qq-seg-bar {
  opacity: 0.8;
}

.qq-question,
.qq-field {
  min-width: 0;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.qq-body > .qq-question,
.qq-body > .qq-row,
.qq-nav {
  scroll-margin-top: var(--qq-scroll-offset, 24px);
  scroll-margin-bottom: 24px;
}

.qq-label {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--qq-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

legend.qq-label {
  float: left;
}

legend.qq-label + * {
  clear: both;
}

.qq-input-wrap {
  position: relative;
}

.qq-input,
.qq-dd-btn {
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--qq-border);
  border-radius: var(--qq-radius);
  background: var(--qq-field);
  color: var(--qq-text);
  font: inherit;
  font-size: 16px;
  text-align: left;
  box-shadow: none;
}

.qq-input::placeholder {
  color: var(--qq-muted);
}

.qq-input:focus,
.qq-dd-btn:focus-visible,
.qq-dd.is-open .qq-dd-btn {
  border-color: var(--qq-primary);
  outline: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--qq-primary);
}

.qq-question--measure .qq-input {
  padding-right: 56px;
}

.qq-unit {
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--qq-muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  transform: translateY(-50%);
  pointer-events: none;
}

.qq-units {
  display: flex;
  width: max-content;
  margin: 0 0 16px auto;
  padding: 2px;
  border-radius: var(--qq-button-radius);
  background: var(--qq-tint);
}

.qq-units button {
  min-width: 52px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--qq-button-radius);
  background: transparent;
  color: var(--qq-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.qq-units button.is-active {
  background: var(--qq-primary);
  color: var(--qq-primary-contrast);
}

.qq-row {
  display: grid;
  gap: 0 16px;
}

.qq-row--measure {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qq-row--select {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qq-dd {
  position: relative;
}

.qq-dd-btn {
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.qq-dd-value {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.qq-dd-chevron {
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.qq-dd.is-open .qq-dd-chevron {
  transform: rotate(180deg);
}

.qq-dd-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 300px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--qq-border);
  border-radius: var(--qq-radius);
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  list-style: none;
  outline: none;
}

.qq-dd-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 12px;
  border-radius: calc(var(--qq-radius) - 2px);
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
}

.qq-dd-list li:hover,
.qq-dd-list li.is-active {
  background: var(--qq-tint);
}

.qq-dd-list li[aria-selected="true"] {
  color: var(--qq-primary);
  font-weight: 600;
}

.qq-dd-swatch {
  flex: 0 0 auto;
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--qq-border);
}

.qq-dd-swatch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qq-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qq-card {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.qq-card input,
.qq-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qq-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  min-height: 56px;
  padding: 16px 10px;
  border: 1px solid var(--qq-border);
  border-radius: var(--qq-radius);
  background: #fff;
  text-align: center;
  transition: border-color 0.15s ease;
}

.qq-card-label {
  color: var(--qq-text);
  font-size: 15px;
  line-height: 1.35;
}

.qq-cards--icons .qq-card-body {
  min-height: 140px;
}

.qq-cards--icons .qq-card--text .qq-card-body {
  min-height: 56px;
}

.qq-cards--icons .qq-card-media {
  display: block;
  width: 100%;
  max-width: 96px;
  height: 64px;
}

.qq-cards--icons .qq-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qq-cards--photos .qq-card-body {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.qq-cards--photos .qq-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--qq-tint);
}

.qq-cards--photos .qq-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qq-cards--photos .qq-card-label {
  display: block;
  width: 100%;
  padding: 12px 10px;
  font-size: 17px;
}

.qq-color {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--qq-radius) / 2);
}

.qq-check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--qq-primary);
  color: var(--qq-primary-contrast);
}

.qq-check svg {
  width: 13px;
  height: 13px;
}

.qq-card:hover .qq-card-body {
  border-color: var(--qq-primary);
}

.qq-card input:checked + .qq-card-body {
  border-color: var(--qq-primary);
  box-shadow: inset 0 0 0 1px var(--qq-primary);
}

.qq-card input:checked + .qq-card-body .qq-card-label,
.qq-card:hover .qq-card-body .qq-card-label {
  color: var(--qq-primary);
}

.qq-card input:checked + .qq-card-body .qq-check {
  display: flex;
}

.qq-card input:focus-visible + .qq-card-body,
.qq-swatch input:focus-visible + .qq-swatch-body {
  outline: 2px solid var(--qq-primary);
  outline-offset: 3px;
}

.qq-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 16px 12px;
  max-height: 440px;
  overflow-y: auto;
  padding: 4px;
}

.qq-search {
  margin-bottom: 16px;
}

.qq-swatch {
  margin: 0;
  cursor: pointer;
}

.qq-swatch-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px;
  text-align: center;
}

.qq-swatch-media {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--qq-border);
}

.qq-swatch-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qq-swatch-media .qq-color {
  border-radius: 0;
}

.qq-swatch-label {
  font-size: 14px;
  line-height: 1.3;
}

.qq-swatch input:checked + .qq-swatch-body .qq-swatch-media {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--qq-primary);
}

.qq-swatch input:checked + .qq-swatch-body .qq-swatch-label {
  color: var(--qq-primary);
  font-weight: 600;
}

.qq-no-match {
  margin: 8px 0 0;
  color: var(--qq-muted);
}

.qq-error {
  display: none;
  margin: 6px 0 0;
  color: var(--qq-error);
  font-size: 14px;
}

.is-invalid > .qq-error {
  display: block;
}

.is-invalid .qq-input,
.is-invalid .qq-dd-btn,
.is-invalid .qq-card-body {
  border-color: var(--qq-error);
}

.qq-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.qq-contact .qq-field {
  flex: 1 1 100%;
}

.qq-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.qq-message {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: var(--qq-radius);
  background: var(--qq-error-tint);
  color: var(--qq-error);
}

.qq-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.qq-nav--center {
  justify-content: center;
}

.qq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 48px;
  padding: 0 24px;
  border: 1px solid var(--qq-primary);
  border-radius: var(--qq-button-radius);
  background: var(--qq-primary);
  color: var(--qq-primary-contrast);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.qq-btn:hover,
.qq-btn:focus-visible {
  opacity: 0.9;
}

.qq-btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.qq-btn--ghost {
  background: transparent;
  color: var(--qq-primary);
}

.qq-btn--ghost:hover {
  background: var(--qq-primary);
  color: white;
}

.qq-head--done {
  padding: 16px 0;
}

.qq-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--qq-primary);
  color: var(--qq-primary-contrast);
}

.qq-done-icon svg {
  width: 26px;
  height: 26px;
}

.qq-done {
  max-width: 560px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
  outline: none;
}

@media (max-width: 575px) {
  .qq-row--measure,
  .qq-row--select {
    grid-template-columns: minmax(0, 1fr);
  }

  .qq-cards.qq-cols-3,
  .qq-cards.qq-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qq-nav .qq-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .qq-nav--center .qq-btn {
    flex: 0 1 240px;
  }
}

@media (min-width: 576px) {
  .qq-contact .qq-field--half {
    flex: 1 1 calc(50% - 8px);
  }
}

@media (min-width: 768px) {
  .qq-cards.qq-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .qq-cards.qq-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .qq-title {
    font-size: 32px;
  }
}
