@import url('https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
  --xb-green:       #00A536;
  --xb-green-light: #F2FAF5;
  --xb-blue:        #0DA9FF;
  --xb-orange:      #F59A27;
  --xb-red:         #DF1E1E;
  --xb-sand:        #FFF5EC;
  --xb-black:       #000000;
  --xb-gray:        #707070;
  --xb-bg:          #F8FAFC;
  --xb-bg-input:    #FAFAFA;
  --xb-white:       #FFFFFF;
  --xb-radius:      16px;
  --xb-radius-sm:   12px;
  --xb-radius-xs:   8px;
  --xb-shadow:      0 4px 24px rgba(0,64,42,0.07);
  --xb-font:        'Merriweather Sans';
}

.xbf * { margin: 0; padding: 0; box-sizing: border-box; }
.xbf { font-family: var(--xb-font); color: var(--xb-black); -webkit-font-smoothing: antialiased; }
.xbf-hero {
  text-align: center;
  padding: 40px 20px 32px;
}

.xbf-hero__pre {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--xb-black);
  margin-bottom: 12px;
}

.xbf-hero__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--xb-black);
  line-height: 1.2;
  margin-bottom: 24px;
  text-transform: none;
}

.xbf-hero__title span {
  color: #00AAFF;
}

.xbf-hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.xbf-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border: 1.5px solid var(--xb-green);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--xb-green);
  background: var(--xb-white);
  white-space: nowrap;
}

.xbf-card {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.xbf-card__inner {
  background: var(--xb-white);
  border-radius: var(--xb-radius);
  box-shadow: var(--xb-shadow);
  padding: 40px 48px 44px;
  border: 1px solid rgba(0,0,0,0.04);
  min-height: 380px;
  position: relative;
}

.xbf-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  padding: 0 20px;
}

.xbf-progress__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cdd5dc;
  background: var(--xb-white);
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.xbf-progress__dot.active {
  border-color: var(--xb-green);
  background: var(--xb-green);
}

.xbf-progress__dot.completed {
  border-color: var(--xb-green);
  background: var(--xb-green);
}

.xbf-progress__line {
  flex: 1;
  height: 3px;
  background: #cdd5dc;
  margin: 0 -1px;
  transition: background 0.3s ease;
}

.xbf-progress__line.completed {
  background: #00a53742;
}

.xbf-step {
  display: none;
  animation: xbfFadeIn 0.35s ease;
}

.xbf-step.active { display: block; }

@keyframes xbfFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.xbf-step__question {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--xb-black);
  text-align: center;
  margin-bottom: 36px;
  line-height: 1.3;
  text-transform: none;
}

.xbf-final-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 560px;
  margin: 0 auto 34px;
  text-align: left;
}

.xbf-final-intro__icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.xbf-final-intro__icon svg {
  display: block;
  width: 48px;
  height: 48px;
}

.xbf-final-intro__content {
  min-width: 0;
}

.xbf-final-intro__title {
  margin: 0 0 6px;
  color: #09a63f;
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 800;
  text-transform: none;
}

.xbf-final-intro__desc {
  margin: 0;
  color: #6fc87d;
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 600;
}

.xbf-options {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.xbf-option {
  position: relative;
  cursor: pointer;
  flex: 0 1 170px;
  max-width: 190px;
}

.xbf-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.xbf-option__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 0;
  border: 2px solid #e8ecf0;
  border-radius: var(--xb-radius-sm);
  transition: all 0.25s ease;
  background: var(--xb-white);
  height: 100%;
  overflow: hidden;
}

.xbf-option__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xbf-option__icon svg {
  width: 56px;
  height: 56px;
  transition: all 0.25s ease;
}

.xbf-option__icon--step1 {
  width: 82px;
  height: 72px;
  margin-bottom: 22px;
}

.xbf-option__icon--step1 svg {
  width: 78px;
  height: 68px;
}

.xbf-option__icon--inquilino svg {
  width: 68px;
  height: 58px;
  transform: translateY(1px);
}

.xbf-option__icon--comunidad svg {
  width: 66px;
  height: 56px;
  transform: translateY(2px);
}

.xbf-option__icon--step2 {
  width: 78px;
  height: 76px;
  margin-bottom: 22px;
}

.xbf-option__icon--step2 svg {
  width: 74px;
  height: 72px;
}

.xbf-option__label {
  width: calc(100% + 32px);
  margin: 0 -16px;
  padding: 14px 16px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--xb-white);
  background: var(--xb-green);
  border-radius: 0 0 10px 10px;
  transition: all 0.25s ease;
  margin-top: auto;
}

.xbf-option--blue .xbf-option__label { background: var(--xb-blue); }
.xbf-option--orange .xbf-option__label { background: var(--xb-orange); }
.xbf-option--green .xbf-option__label { background: var(--xb-green); }
.xbf-option--gray .xbf-option__label { background: var(--xb-gray); }

.xbf-option__card:hover {
  border-color: #c8cdd3;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.xbf-option input:checked + .xbf-option__card {
  border-color: var(--xb-green);
  box-shadow: 0 4px 16px rgba(0,164,67,0.15);
}

.xbf-option--blue input:checked + .xbf-option__card { border-color: var(--xb-blue); box-shadow: 0 4px 16px rgba(72,160,217,0.2); }
.xbf-option--orange input:checked + .xbf-option__card { border-color: var(--xb-orange); box-shadow: 0 4px 16px rgba(245,154,39,0.2); }

.xbf-fields {
  max-width: 460px;
  margin: 0 auto;
}

.xbf-field {
  margin-bottom: 20px;
}

.xbf-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--xb-gray);
  margin-bottom: 7px;
}

.xbf-field label .req {
  color: var(--xb-red);
}

.xbf-field input,
.xbf-field select {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #dde1e6;
  border-radius: var(--xb-radius-xs);
  font-family: var(--xb-font);
  font-size: 0.95rem;
  color: var(--xb-black);
  background: var(--xb-bg-input);
  outline: none;
  transition: all 0.25s ease;
  appearance: none;
  -webkit-appearance: none;
}

.xbf-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23707070'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.xbf-field select:disabled {
  cursor: not-allowed;
  color: #8d97a3;
  background-color: #f3f5f7;
}

.xbf-field input:focus,
.xbf-field select:focus {
  border-color: var(--xb-green);
  box-shadow: 0 0 0 3px rgba(0,164,67,0.1);
}

.xbf-field input.error,
.xbf-field select.error {
  border-color: var(--xb-red);
  box-shadow: 0 0 0 3px rgba(223,30,30,0.08);
}

.xbf-field .xbf-error {
  font-size: 0.78rem;
  color: var(--xb-red);
  margin-top: 5px;
  display: none;
}

.xbf-field .xbf-error.visible { display: block; }

.xbf-field .xbf-hint {
  font-size: 0.78rem;
  color: var(--xb-gray);
  margin-top: 5px;
}

.xbf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.xbf-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--xb-gray);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--xb-font);
  padding: 0;
  margin-top: 32px;
  transition: color 0.2s ease;
}

.xbf-back:hover {
  color: var(--xb-black);
  background: none;
  box-shadow: none;
}

.xbf-back svg {
  width: 16px;
  height: 16px;
}

.xbf-submit-row {
  margin-top: 28px;
}

.xbf-submit {
  width: 100%;
  padding: 16px 32px;
  background: var(--xb-green);
  color: var(--xb-white);
  border: none;
  border-radius: var(--xb-radius-xs);
  font-family: var(--xb-font);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.xbf-submit:hover {
  background: #009239;
  box-shadow: 0 4px 16px rgba(0,164,67,0.3);
  transform: translateY(-1px);
}

.xbf-submit:disabled {
  background: #cdd5dc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.xbf-screen {
  display: none;
  text-align: center;
  padding: 20px 0;
  animation: xbfFadeIn 0.35s ease;
}

.xbf-screen.active { display: block; }

.xbf-screen__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.xbf-screen__icon svg {
  width: 80px;
  height: 80px;
}

.xbf-screen h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--xb-green);
  margin-bottom: 12px;
  text-transform: none;
}

.xbf-screen p {
  font-size: 0.92rem;
  color: var(--xb-green);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 20px;
}

.xbf-screen a {
  color: var(--xb-green);
  text-decoration: underline;
}

.xbf-screen .xbf-btn-restart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  background: var(--xb-white);
  color: var(--xb-green);
  border: 2px solid var(--xb-green);
  border-radius: var(--xb-radius-xs);
  font-family: var(--xb-font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.xbf-screen .xbf-btn-restart:hover {
  background: var(--xb-green-light);
}

.xbf-screen--reject .xbf-screen__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
}

.xbf-screen--reject .xbf-screen__icon svg {
  width: 64px;
  height: 64px;
}

.xbf-screen--reject h2 {
  color: var(--xb-orange);
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}

.xbf-screen--reject p {
  color: #f6ae49;
  font-size: 1rem;
  line-height: 1.55;
  max-width: 560px;
  margin: 0 auto 28px;
  font-weight: 600;
}

.xbf-screen--reject .xbf-btn-restart {
  padding: 13px 30px;
  background: var(--xb-green);
  color: var(--xb-white);
  border: none;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0;
}

.xbf-screen--reject .xbf-btn-restart:hover {
  background: #009c32;
}

.xbf-legal {
  margin-top: 16px;
}

.xbf-legal label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--xb-gray);
  line-height: 1.5;
  font-weight: 400;
}

.xbf-legal__text {
  flex: 1 1 auto;
  min-width: 0;
}

.xbf-legal input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--xb-green);
}

.xbf-legal a {
  color: var(--xb-green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.xbf-legal .xbf-error {
  font-size: 0.78rem;
  color: var(--xb-red);
  margin-top: 5px;
  display: none;
}

.xbf-legal .xbf-error.visible { display: block; }

.xbf-spinner {
  display: none;
  text-align: center;
  padding: 60px 20px;
}

.xbf-spinner.active { display: block; }

.xbf-spinner::after {
  content: '';
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid #e2e5e9;
  border-top-color: var(--xb-green);
  border-radius: 50%;
  animation: xbfSpin 0.7s linear infinite;
}

@keyframes xbfSpin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .xbf-card__inner {
    padding: 28px 20px 32px;
  }
  .xbf-hero__title {
    font-size: 1.5rem;
  }
  .xbf-options {
    gap: 12px;
  }
  .xbf-option {
    flex: 0 1 140px;
  }
  .xbf-option__icon {
    width: 48px;
    height: 48px;
  }
  .xbf-option__icon svg {
    width: 42px;
    height: 42px;
  }
  .xbf-option__icon--step1 {
    width: 68px;
    height: 60px;
  }
  .xbf-option__icon--step1 svg {
    width: 64px;
    height: 56px;
  }
  .xbf-option__icon--inquilino svg {
    width: 56px;
    height: 48px;
  }
  .xbf-option__icon--comunidad svg {
    width: 54px;
    height: 46px;
  }
  .xbf-option__icon--step2 {
    width: 64px;
    height: 64px;
  }
  .xbf-option__icon--step2 svg {
    width: 60px;
    height: 60px;
  }
  .xbf-step__question {
    font-size: 1.15rem;
  }
  .xbf-final-intro {
    gap: 14px;
    margin-bottom: 28px;
  }
  .xbf-final-intro__title {
    font-size: 1.55rem;
  }
  .xbf-final-intro__desc {
    font-size: 0.92rem;
  }
  .xbf-hero__badges {
    gap: 8px;
  }
  .xbf-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
  }
  .xbf-row {
    grid-template-columns: 1fr;
  }
  .xbf-legal {
    margin-top: 18px;
  }
  .xbf-legal label {
    gap: 12px;
    font-size: 0.84rem;
    line-height: 1.45;
  }
  .xbf-legal input[type="checkbox"] {
    width: 19px;
    height: 19px;
    margin-top: 1px;
  }
  .xbf-legal__text {
    display: block;
  }
  .xbf-legal a {
    font-weight: 600;
  }
}

@media (max-width: 420px) {
  .xbf-option {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .xbf-option__card {
    flex-direction: row;
    padding: 16px 20px;
    gap: 16px;
  }
  .xbf-option__icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
  }
  .xbf-option__label {
    width: auto;
    margin: 0;
    padding: 0;
    background: none !important;
    color: var(--xb-black);
    font-size: 0.95rem;
    border-radius: 0;
    text-align: left;
  }
  .xbf-final-intro {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .xbf-final-intro__title {
    font-size: 1.3rem;
  }
  .xbf-final-intro__desc {
    font-size: 0.88rem;
  }
  .xbf-legal label {
    gap: 10px;
    font-size: 0.8rem;
    line-height: 1.4;
  }
  .xbf-legal input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 1px;
  }
}
