:root {
  /* Brand palette */
  --color-ivory: #F3EDE3;
  --color-paper: #FAF7F2;
  --color-sand: #DACCB4;
  --color-sand-line: #C8B89B;
  --color-jet: #2D2C2F;
  --color-jet-hover: #3D3C40;
  --color-jet-line: #48464A;
  --color-citron: #A0AC4F;
  --color-citron-deep: #58622A;
  --color-citron-light: #EDF0DE;
  --color-citron-glow: rgba(160, 172, 79, 0.35);
  --color-text-secondary: #5C574F;
  --color-field-border: #857C6B;
  --color-on-black: #C9BFAE;

  /* Semantic roles used throughout this stylesheet */
  --color-bg: var(--color-ivory);
  --color-surface: var(--color-paper);
  --color-border: var(--color-sand-line);
  --color-text: var(--color-jet);
  --color-text-muted: var(--color-text-secondary);
  --color-primary: var(--color-jet);
  --color-primary-hover: var(--color-jet-hover);
  --color-primary-light: var(--color-citron-light);
  --color-primary-deep: var(--color-citron-deep);
  --color-primary-glow: var(--color-citron-glow);
  --color-on-primary: var(--color-ivory);
  --color-error: #DC2626;
  --color-error-light: #FEF2F2;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-full: 999px;
  --shadow-card: 0 1px 3px rgba(45, 44, 47, 0.06), 0 12px 32px rgba(45, 44, 47, 0.06);
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Instrument Serif", Georgia, "Times New Roman", serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- App shell ---- */

.qf-app {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

@media (min-width: 720px) {
  .qf-app {
    padding: 64px 20px 96px;
  }
}

.qf-header {
  margin-bottom: 28px;
  animation: qf-rise 0.6s var(--ease-out) both;
}

/* Small uppercase kicker, like the "BRAND PALETTE" label on the brand board */
.qf-title {
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0;
}

.qf-intro {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ---- Progress ---- */

.qf-progress-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -20px 28px;
  padding: 16px 20px;
  background: rgba(243, 237, 227, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  animation: qf-fade 0.5s var(--ease-out) both;
}

/* Stepper: numbered circles on a line, the current step's name hangs below its circle */

.qf-stepper {
  position: relative;
  padding-bottom: 50px;
}

.qf-progress-track {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  overflow: hidden;
}

/* Dark citron as a fill on a light ground: allowed by the brand guide (no text on it) */
.qf-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-citron-deep), var(--color-citron));
  border-radius: var(--radius-full);
  transition: width 0.7s var(--ease-out);
}

.qf-progress {
  position: relative;
  list-style: none;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
}

.qf-progress__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qf-progress__number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.qf-progress__step.is-complete .qf-progress__number {
  background: var(--color-primary-light);
  border: 1.5px solid var(--color-citron);
  color: var(--color-primary-deep);
}

/* Citron on jet (5.6:1): the brand guide's "step numbers" accent */
.qf-progress__step.is-active .qf-progress__number {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-citron);
  box-shadow: 0 4px 14px var(--color-primary-glow);
}

/* Only the current step shows its name, in a pill under the circle */
.qf-progress__title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.qf-progress__step.is-active::after {
  content: "";
  position: absolute;
  top: 36px;
  left: 50%;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  background: var(--color-primary);
}

.qf-progress__step.is-active .qf-progress__title {
  top: 44px;
  left: 50%;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  transform: translateX(calc(-50% + var(--pill-shift, 0px)));
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 4px 14px var(--color-primary-glow);
  animation: qf-fade 0.4s var(--ease-out) both;
}

/* The stepper already shows the position; the "Step X of Y" text stays for screen readers */
.qf-progress__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  margin: 0;
}

/* ---- Step / section ---- */

.qf-section-title {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 8px 0 10px;
}

.qf-section-title__num {
  display: block;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--color-citron-deep);
  margin-bottom: 10px;
}

/* Step entrance: each block rises in, lightly staggered */
.qf-step--enter > * {
  animation: qf-rise 0.55s var(--ease-out) both;
}
.qf-step--enter > :nth-child(2) { animation-delay: 50ms; }
.qf-step--enter > :nth-child(3) { animation-delay: 100ms; }
.qf-step--enter > :nth-child(4) { animation-delay: 150ms; }
.qf-step--enter > :nth-child(5) { animation-delay: 200ms; }
.qf-step--enter > :nth-child(6) { animation-delay: 250ms; }
.qf-step--enter > :nth-child(7) { animation-delay: 300ms; }
.qf-step--enter > :nth-child(n + 8) { animation-delay: 350ms; }

@keyframes qf-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes qf-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.qf-form {
  margin-top: 28px;
}

/* ---- Fields ---- */

.qf-field {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, box-shadow 0.35s var(--ease-out);
}

.qf-field:focus-within {
  border-color: var(--color-field-border);
  box-shadow: 0 1px 3px rgba(45, 44, 47, 0.06), 0 18px 40px rgba(45, 44, 47, 0.1);
}

.qf-field__label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

.qf-field__help {
  color: var(--color-text-muted);
  font-size: 13px;
  font-style: italic;
  margin: 0 0 12px;
}

.qf-field__input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-field-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 15px;
  margin-top: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea.qf-field__input {
  resize: vertical;
  min-height: 96px;
}

.qf-field__input:focus {
  outline: none;
  border-color: var(--color-primary-deep);
  background: var(--color-surface);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.qf-field__note {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--color-citron-light);
  color: var(--color-jet);
  font-size: 13px;
  line-height: 1.5;
}

.qf-field__note[hidden] {
  display: none;
}

.qf-field__error {
  color: var(--color-error);
  font-size: 13px;
  font-weight: 600;
  margin: 10px 0 0;
}

.qf-field.has-error {
  border-color: var(--color-error);
}

.qf-field.has-error .qf-field__input {
  border-color: var(--color-error);
}

/* ---- Options (single / multi select) ---- */

.qf-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.qf-option {
  position: relative;
}

.qf-option__label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-field-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-out), box-shadow 0.2s ease;
  user-select: none;
}

.qf-option__label input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.qf-option:hover .qf-option__label {
  border-color: var(--color-jet);
  transform: translateY(-1px);
}

.qf-option .qf-option__label:active {
  transform: scale(0.97);
}

.qf-option:has(input:checked) .qf-option__label {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: 0 6px 16px rgba(45, 44, 47, 0.16);
}

/* Citron on jet: the "benefit mark" accent from the brand guide */
.qf-option:has(input:checked) .qf-option__label::before {
  content: "✓";
  font-weight: 800;
  color: var(--color-citron);
}

.qf-option:has(input:focus-visible) .qf-option__label {
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* When an option's text box is open, it takes the whole row so longer answers (several emails) fit */
.qf-option:has(> .qf-field__other-input:not([hidden])) {
  flex-basis: 100%;
}

.qf-option:has(> .qf-field__other-input:not([hidden])) .qf-option__label {
  width: fit-content;
}

.qf-field__other-input {
  display: block;
  width: 100%;

  margin-top: 10px;
  padding: 10px 12px;
  border: 1.5px dashed var(--color-field-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-family: inherit;
  font-size: 14px;
}

.qf-field__other-input:focus {
  outline: none;
  border-style: solid;
  border-color: var(--color-primary-deep);
}

.qf-field__other-input[hidden] {
  display: none;
}

/* ---- Two column text ---- */

.qf-field__cols {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.qf-field__col {
  flex: 1 1 200px;
}

.qf-field__col-label {
  display: block;
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.qf-field__col .qf-field__input {
  margin-top: 0;
}

/* ---- Navigation ---- */

.qf-form__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 28px -20px 0;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  position: sticky;
  bottom: 0;
  background: rgba(243, 237, 227, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
}

.qf-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-full);
  padding: 14px 26px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease-out), box-shadow 0.25s ease;
}

.qf-btn::before,
.qf-btn::after {
  display: inline-block;
  transition: transform 0.25s var(--ease-out);
}

.qf-btn--prev {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.qf-btn--prev:hover {
  border-color: var(--color-jet);
}

.qf-btn--prev::before {
  content: "←";
  margin-right: 8px;
}

.qf-btn--prev:hover::before {
  transform: translateX(-3px);
}

.qf-btn--next {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: 0 8px 20px var(--color-primary-glow);
  margin-left: auto;
}

.qf-btn--next::after {
  content: "→";
  margin-left: 8px;
  color: var(--color-citron);
}

.qf-btn--next:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px var(--color-primary-glow);
}

.qf-btn--next:hover::after {
  transform: translateX(3px);
}

.qf-btn:active,
.qf-btn--next:active {
  transform: scale(0.98);
}

.qf-btn--next:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---- Banner ---- */

.qf-form__banner {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary-deep);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  animation: qf-rise 0.5s var(--ease-out) both;
}

.qf-form__banner::before {
  content: "✓  ";
}

.qf-form__banner--error {
  background: var(--color-error-light);
  color: var(--color-error);
}

.qf-form__banner--error::before {
  content: "!  ";
}

/* ---- Home ---- */

.home {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 20px;
}

.home-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.home-intro {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 32px;
}

.home-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.home-link:hover {
  border-color: var(--color-primary-deep);
  transform: translateY(-1px);
}

.home-link__title {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 4px;
}

.home-link__desc {
  color: var(--color-text-muted);
  font-size: 13px;
  margin: 0;
}

.home-link__arrow {
  color: var(--color-primary-deep);
  font-size: 20px;
  font-weight: 700;
}

/* ---- Welcome screen ---- */

.qf-welcome {
  padding: 8px 4px 12px;
}

.qf-welcome__title {
  font-family: var(--font-heading);
  font-size: 46px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.qf-welcome__text {
  color: var(--color-text-muted);
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
}

/* Three short points instead of one paragraph, numbered like the stepper */
.qf-welcome__points {
  list-style: none;
  counter-reset: welcome;
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
}

.qf-welcome__points li {
  counter-increment: welcome;
  position: relative;
  padding-left: 44px;
  min-height: 30px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.qf-welcome__points li::before {
  content: counter(welcome, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  border: 1.5px solid var(--color-citron);
  color: var(--color-primary-deep);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.qf-welcome__points strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ---- Section intro ---- */

.qf-section-intro {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 24px;
}

/* ---- Option type tags and included base items ---- */

.qf-option__tag {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.qf-option:has(input:checked) .qf-option__tag {
  color: var(--color-on-black);
}

/* Base items start selected in a light citron; the couple can still tap to remove them */
.qf-option.qf-option--included:has(input:checked) .qf-option__label {
  background: var(--color-citron-light);
  border-color: var(--color-citron);
  color: var(--color-citron-deep);
  box-shadow: none;
}

.qf-option.qf-option--included:has(input:checked) .qf-option__label::before {
  color: var(--color-citron-deep);
}

.qf-option.qf-option--included .qf-option__tag,
.qf-option.qf-option--included:has(input:checked) .qf-option__tag {
  color: var(--color-citron-deep);
}

/* ---- Live quote: bar in the sticky header ---- */

.qf-progress__meta {
  display: flex;
  align-items: flex-end;
}

.qq-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  row-gap: 6px;
}

.qq-bar__label {
  flex-basis: 100%;
}

.qq-bar__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.qq-bar__pkg {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-citron-deep);
}

.qq-bar__amount {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1;
  color: var(--color-jet);
  font-variant-numeric: tabular-nums;
}

.qq-bar__from {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.qq-bar__delta {
  align-self: center;
  margin-left: 4px;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-citron-light);
  color: var(--color-citron-deep);
  font-size: 11.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}

.qq-bar__delta--down {
  background: var(--color-sand);
  color: var(--color-jet);
}

.qq-flash {
  animation: qq-flash 1.6s var(--ease-out);
}

@keyframes qq-flash {
  0% { opacity: 0; transform: translateY(-6px); }
  15% { opacity: 1; transform: none; }
  70% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(4px); }
}

.qq-pop {
  animation: qq-pop 0.6s var(--ease-out);
}

@keyframes qq-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.qq-bar__pkg {
  display: inline-block;
}

/* ---- Live quote: starting price on the welcome screen ---- */

.qq-start {
  margin-top: 26px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.qq-kicker {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-citron-deep);
}

.qq-start__price {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 52px;
  line-height: 1;
}

.qq-start__note {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---- Live quote: section counter (section 4) ---- */

.qq-counter {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--color-citron-light);
}

.qq-counter__main {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-citron-deep);
}

/* One slot per section the package covers, filled as the couple uses them */
.qq-counter__meter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 8px;
}

.qq-counter__slots {
  display: flex;
  gap: 4px;
}

.qq-counter__slots span {
  width: 22px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-citron);
  transition: background 0.3s ease;
}

.qq-counter__slots span.is-used {
  background: var(--color-citron-deep);
  border-color: var(--color-citron-deep);
}

.qq-counter__used {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-citron-deep);
}

.qq-counter__status {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.qq-counter__prices {
  margin: 0;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

@media (max-width: 600px) {
  .qq-counter__slots span { width: 16px; }
}

/* ---- Live quote: full breakdown (Ivory, Citron and on-black text on Jet) ---- */

.qq-card {
  margin: 8px 0 16px;
  padding: 26px 24px 22px;
  border-radius: var(--radius-lg);
  background: var(--color-jet);
  color: var(--color-ivory);
  box-shadow: 0 18px 40px rgba(45, 44, 47, 0.18);
}

.qq-card .qq-kicker {
  color: var(--color-citron);
}

.qq-card__total {
  margin: 4px 0 4px;
  font-family: var(--font-heading);
  font-size: 54px;
  line-height: 1;
}

.qq-from {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-on-black);
}

.qq-vat {
  margin-left: 0.15em;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.qq-bar .qq-vat {
  margin-left: 0.1em;
  font-size: 11px;
}

.qq-card .qq-vat {
  color: var(--color-on-black);
}

.qq-card__pkg {
  margin: 0 0 14px;
  color: var(--color-on-black);
  font-size: 14px;
}

.qq-save {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(160, 172, 79, 0.16);
  color: var(--color-citron);
  font-size: 13.5px;
  font-weight: 600;
}

.qq-group {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--color-jet-line);
}

.qq-group__title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-on-black);
}

.qq-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.qq-lines li {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
  font-size: 13.5px;
}

.qq-code {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-citron);
}

.qq-line__amount {
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.qq-lines li.is-included .qq-line__amount {
  color: var(--color-on-black);
  font-weight: 500;
}

.qq-foot {
  margin: 14px 0 0;
  color: var(--color-on-black);
  font-size: 12px;
  line-height: 1.5;
}

/* ---- Small screens ---- */

@media (max-width: 600px) {
  .qf-progress-track { top: 13px; left: 15px; right: 15px; }
  .qf-progress__number { width: 30px; height: 30px; font-size: 11.5px; }
  .qf-progress__step.is-active::after { top: 30px; }
  .qf-progress__step.is-active .qf-progress__title { top: 38px; font-size: 12px; padding: 6px 14px; }
  .qf-stepper { padding-bottom: 46px; }
  .qq-bar__amount { font-size: 30px; }
  .qq-card__total { font-size: 44px; }
  .qq-lines li { grid-template-columns: 34px 1fr auto; font-size: 13px; }
  .qf-welcome__title { font-size: 36px; }
  .qf-section-title { font-size: 28px; }
  .home-title { font-size: 38px; }
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Consent checkbox ---- */

.qf-field--consent {
  padding: 16px 18px;
}

.qf-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14.5px;
  line-height: 1.5;
}

.qf-consent input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-primary-deep);
  cursor: pointer;
}

.qf-consent a {
  color: var(--color-primary-deep);
  font-weight: 600;
}

/* ---- Option color swatch ---- */

.qf-option__swatch {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(45, 44, 47, 0.12);
  margin-right: 2px;
  vertical-align: -2px;
}

/* ---- Reference images upload ---- */

.qf-images {
  margin-top: 12px;
}

.qf-images__drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 16px;
  border: 1.5px dashed var(--color-field-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.qf-images__drop:hover,
.qf-images__drop:focus-within {
  border-color: var(--color-jet);
  background: var(--color-surface);
}

/* The real file input covers the whole area, so tapping or dropping files anywhere works */
.qf-images__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.qf-images__cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.qf-images__hint {
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.qf-images__busy {
  display: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-citron-deep);
}

.qf-images.is-busy .qf-images__busy {
  display: block;
}

.qf-images.is-busy .qf-images__drop {
  opacity: 0.6;
  pointer-events: none;
}

.qf-images__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.qf-images__list:empty {
  display: none;
}

.qf-images__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  animation: qf-fade 0.3s var(--ease-out) both;
}

.qf-images__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qf-images__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

/* ---- Option font preview ---- */

.qf-option--font .qf-option__label {
  padding: 10px 16px;
  align-items: stretch;
}

.qf-option__font-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.qf-option__font-preview {
  font-size: 20px;
  line-height: 1.3;
}

.qf-option__font-label {
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.75;
}

/* Font pairings: heading font on the names, body font on a sample line */

.qf-options--pairs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.qf-options--pairs .qf-option:not(.qf-option--font) {
  grid-column: 1 / -1;
  justify-self: start;
}

.qf-options--pairs .qf-option--font .qf-option__label {
  height: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-md);
}

.qf-options--pairs .qf-option--font .qf-option__font-wrap {
  gap: 6px;
}

.qf-options--pairs .qf-option__font-preview {
  font-size: 26px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.qf-option__font-body {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.qf-options--pairs .qf-option__font-label {
  margin-top: 4px;
}

.qf-options--pairs .qf-option--font:has(input:checked) .qf-option__label::before {
  position: absolute;
  top: 12px;
  right: 14px;
}

@media (max-width: 600px) {
  .qf-options--pairs {
    grid-template-columns: 1fr;
  }
}
