.htw {
  --htw-black: #121314;
  --htw-white: #fff;
  --htw-body: #f2f3f4;
  --htw-mint: #59c8c1;
  --htw-gray: #a5a5a5;
  --htw-gray-light: #d2d2d2;
  --htw-gray-dark: #787878;
  --htw-red: #ef5b5b;
  --htw-head: Haval, Arial, Helvetica, system-ui, -apple-system, sans-serif;
  --htw-text: TT-Wellingtons, Arial, Helvetica, system-ui, -apple-system, sans-serif;
  --htw-side: 24px;
  --htw-bottom: 24px;
  --htw-shift: 0px;
}

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

.htw :where(button, input, label, h2, p) {
  margin: 0;
  font: inherit;
  color: inherit;
  text-transform: none;
  letter-spacing: normal;
}

.htw-launcher {
  position: fixed;
  bottom: calc(var(--htw-bottom) + var(--htw-shift));
  left: var(--htw-side);
  transition: bottom .25s;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row-reverse;
  font-family: var(--htw-text);
}

.htw--right .htw-launcher {
  left: auto;
  right: var(--htw-side);
  flex-direction: row;
}

.htw-circle {
  position: relative;
  flex: none;
  width: 92px;
  height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  border: 2px solid var(--htw-mint);
  border-radius: 50%;
  background: var(--htw-mint);
  color: var(--htw-black);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .25s, color .25s, border-color .25s;
}

.htw-circle:hover {
  background: var(--htw-black);
  border-color: var(--htw-black);
  color: var(--htw-white);
}

.htw-circle svg {
  width: 32px;
  height: 32px;
  display: block;
}

.htw-circle__label {
  max-width: 64px;
  font-family: var(--htw-head);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.htw-circle__ring {
  position: absolute;
  inset: -2px;
  border: 2px solid var(--htw-mint);
  border-radius: 50%;
  animation: htw-pulse 2.6s ease-out infinite;
  pointer-events: none;
}

@keyframes htw-pulse {
  0% { transform: scale(1); opacity: .7; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.htw-hint {
  position: relative;
  max-width: 250px;
  padding: 14px 34px 14px 16px;
  background: var(--htw-white);
  color: var(--htw-black);
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 12px 32px rgba(18, 19, 20, .16);
  cursor: pointer;
}

.htw-hint b {
  font-family: var(--htw-head);
  font-weight: 500;
  white-space: nowrap;
}

.htw-hint::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -7px;
  width: 14px;
  height: 14px;
  background: var(--htw-white);
  transform: translateY(-50%) rotate(45deg);
}

.htw--right .htw-hint::after {
  left: auto;
  right: -7px;
}

.htw-hint__close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--htw-gray);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.htw-hint__close:hover {
  color: var(--htw-black);
}

.htw-launcher--hidden,
.htw-hint--hidden {
  display: none;
}

.htw-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  overflow: hidden auto;
  overscroll-behavior: none;
  background: rgba(18, 19, 20, .4);
  font-family: var(--htw-text);
}

.htw-modal[hidden] {
  display: none;
}

.htw-modal__box {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: auto;
  padding: 40px;
  background: var(--htw-white);
  color: var(--htw-black);
}

.htw-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--htw-black);
  cursor: pointer;
}

.htw-modal__close svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: auto;
}

.htw-badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px 7px;
  background: var(--htw-mint);
  color: var(--htw-black);
  font-family: var(--htw-head);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.htw-title {
  margin: 0 0 12px;
  font-family: var(--htw-head);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.htw-subtitle {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--htw-gray-dark);
}

.htw-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.htw-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.htw-field {
  position: relative;
}

.htw-control {
  display: flex;
  align-items: center;
  width: 100%;
  height: 60px;
  padding: 0 16px;
  border: 2px solid var(--htw-body);
  border-radius: 0;
  background: var(--htw-body);
  color: var(--htw-black);
  font-family: var(--htw-text);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s;
}

.htw-control:hover:not(:disabled) {
  border-color: var(--htw-gray-light);
}

.htw-control:disabled {
  color: var(--htw-gray);
  cursor: not-allowed;
}

.htw-control--placeholder {
  color: var(--htw-gray);
}

.htw-select {
  justify-content: space-between;
  gap: 8px;
}

.htw-select__value {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.htw-select svg {
  flex: none;
  width: 24px;
  height: 24px;
}

.htw-field--open .htw-select svg {
  transform: rotate(180deg);
}

.htw-input {
  cursor: text;
}

.htw-input::placeholder {
  color: var(--htw-gray);
}

.htw-input:focus {
  outline: none;
  border-color: var(--htw-black);
}

.htw-field--error .htw-control {
  border-color: var(--htw-red);
}

.htw-error {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--htw-red);
}

.htw-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  max-height: 288px;
  background: var(--htw-white);
  box-shadow: 0 12px 32px rgba(18, 19, 20, .18);
}

.htw-field--open .htw-menu {
  display: flex;
}

.htw-menu__search {
  flex: none;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--htw-gray-light);
  background: var(--htw-white);
  font-family: var(--htw-text);
  font-size: 15px;
}

.htw-menu__search:focus {
  outline: none;
}

.htw-menu__list {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--htw-gray) var(--htw-gray-light);
}

.htw-option {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border: 0;
  background: none;
  font-family: var(--htw-text);
  font-size: 15px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.htw-option:hover,
.htw-option--active {
  background: var(--htw-body);
}

.htw-option--group {
  padding: 12px 16px 6px;
  color: var(--htw-gray);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: default;
}

.htw-option--group:hover {
  background: none;
}

.htw-empty {
  padding: 16px;
  color: var(--htw-gray);
  font-size: 15px;
}

.htw-policy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--htw-gray-dark);
  cursor: pointer;
}

.htw-policy input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--htw-black);
}

.htw-doc-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.htw-doc-link:hover {
  color: var(--htw-black);
}

.htw-doc {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  overflow: hidden auto;
  overscroll-behavior: none;
  background: rgba(18, 19, 20, .4);
  scrollbar-width: thin;
  scrollbar-color: var(--htw-gray) var(--htw-gray-light);
}

.htw-doc[hidden] {
  display: none;
}

.htw-doc__box {
  max-width: 760px;
}

.htw-title--doc {
  font-size: 22px;
  margin-right: 40px;
}

.htw-doc__content {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--htw-gray-dark);
}

.htw-doc__content :where(p, ul, ol) {
  margin: 0 0 12px;
  padding-left: 0;
}

.htw-doc__content :where(ul, ol) {
  padding-left: 20px;
}

.htw-doc__content li {
  margin-bottom: 6px;
}

.htw-doc__content strong {
  color: var(--htw-black);
}

.htw-field--error .htw-policy,
.htw-policy--error {
  color: var(--htw-red);
}

.htw-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  margin-top: 12px;
  padding: 20px 19px 21px;
  border: 2px solid var(--htw-black);
  border-radius: 0;
  background: var(--htw-black);
  color: var(--htw-white);
  font-family: var(--htw-head);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .2s, color .2s, border-color .2s;
}

.htw-submit:hover:not(:disabled) {
  background: var(--htw-white);
  color: var(--htw-black);
}

.htw-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.htw-submit svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.htw-note {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--htw-gray);
}

.htw-server-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--htw-red);
}

.htw-success {
  padding: 24px 0 8px;
  text-align: center;
}

.htw-success__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--htw-mint);
  border-radius: 50%;
  color: var(--htw-mint);
}

.htw-success__icon svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 767px) {
  .htw {
    --htw-side: 16px;
    --htw-bottom: 16px;
  }

  .htw-circle {
    width: 68px;
    height: 68px;
  }

  .htw-circle svg {
    width: 24px;
    height: 24px;
  }

  .htw-circle__label {
    max-width: 52px;
    font-size: 7.5px;
  }

  .htw-hint {
    max-width: 190px;
    padding: 12px 28px 12px 12px;
    font-size: 13px;
  }

  .htw-modal__box {
    max-width: none;
    min-height: 100%;
    margin: 0;
    padding: 56px 16px 24px;
  }

  .htw-title {
    font-size: 24px;
  }

  .htw-subtitle {
    margin-bottom: 20px;
    font-size: 14px;
  }

  .htw-row {
    grid-template-columns: 1fr;
  }

  .htw-menu {
    max-height: 244px;
  }

  .htw-submit {
    padding: 18px 16px 19px;
    font-size: 12px;
  }
}
