.ha-community-gate-root,
.ha-community-gate-root * {
  box-sizing: border-box;
}

.ha-community-gate-root {
  width: 100%;
  max-width: 680px;
  margin: 28px auto 22px;
}

.ha-gated-content[data-locked="1"] {
  position: relative;
  max-height: 260px;
  overflow: hidden;
}

.ha-gated-content[data-locked="1"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 75%);
  pointer-events: none;
}

.ha-gated-content[data-locked="1"] > * {
  filter: blur(4px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

.ha-gated-content.is-unlocked {
  max-height: none;
  overflow: visible;
}

.ha-gated-content.is-unlocked::after {
  display: none;
}

.ha-gated-content.is-unlocked > * {
  filter: none;
  opacity: 1;
  pointer-events: auto;
  user-select: auto;
}

.ha-gate-card {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  color: #1f2933;
  background: #fff;
  border: 1px solid rgba(29, 78, 216, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.11);
  overflow: hidden;
}

.ha-gate-card-inner {
  padding: 22px;
}

.ha-gate-close {
  display: block;
  margin: 14px 14px 0 auto;
  padding: 7px 10px;
  max-width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #65758b;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}

.ha-gate-close:hover,
.ha-gate-close:focus {
  background: #f3f6f9;
  color: #172033;
}

.ha-gate-kicker {
  margin: 0 0 8px;
  color: #1d7f63;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.ha-gate-card h2 {
  margin: 0 0 10px;
  color: #172033;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: 0;
}

.ha-gate-desc {
  margin: 0 0 18px;
  color: #566579;
  font-size: 14px;
  line-height: 1.7;
}

.ha-gate-question {
  margin: 0 0 12px;
  color: #1f2933;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.45;
}

.ha-gate-region {
  margin: -4px 0 16px;
  padding: 9px 11px;
  border: 1px solid #d9e9e4;
  border-radius: 8px;
  background: #f6fbf9;
  color: #476356;
  font-size: 13px;
  line-height: 1.45;
}

.ha-gate-question-group {
  margin: 0 0 16px;
}

.ha-gate-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.ha-gate-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 86px;
  padding: 13px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fbfcfd;
  color: #1f2933;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.ha-gate-option:hover,
.ha-gate-option:focus {
  border-color: #6aa6a1;
  background: #f7fbfa;
  outline: none;
}

.ha-gate-option.is-selected {
  border-color: #1d7f63;
  background: #f1faf6;
  box-shadow: 0 0 0 2px rgba(29, 127, 99, 0.12);
}

.ha-gate-option-mark {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex: 0 0 17px;
  border: 2px solid #a6b3c2;
  border-radius: 50%;
  background: #fff;
}

.ha-gate-option.is-selected .ha-gate-option-mark {
  border-color: #1d7f63;
  box-shadow: inset 0 0 0 4px #fff;
  background: #1d7f63;
}

.ha-gate-option-copy {
  display: block;
  min-width: 0;
}

.ha-gate-option-copy strong {
  display: block;
  margin-bottom: 3px;
  color: #172033;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0;
}

.ha-gate-option-copy span {
  display: block;
  color: #65758b;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0;
}

.ha-gate-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
  background: #156b55;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: 0;
  cursor: pointer;
}

.ha-gate-submit:disabled {
  background: #c8d1db;
  color: #f7fafc;
  cursor: not-allowed;
}

.ha-gate-submit:not(:disabled):hover,
.ha-gate-submit:not(:disabled):focus {
  background: #0f5f4b;
  outline: none;
}

.ha-gate-privacy {
  margin: 11px 0 0;
  color: #78879a;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.ha-gate-insight {
  max-width: 680px;
  margin: 18px auto 24px;
  padding: 15px 16px;
  border: 1px solid #cfe5dc;
  border-left: 4px solid #1d7f63;
  border-radius: 8px;
  background: #f3fbf7;
  color: #244236;
  font-size: 14px;
  line-height: 1.75;
}

@media (max-width: 640px) {
  .ha-community-gate-root {
    max-width: 100%;
    margin: 22px 0 18px;
  }

  .ha-gate-card {
    max-width: 100%;
    border-radius: 8px;
  }

  .ha-gate-card-inner {
    padding: 18px;
  }

  .ha-gate-card h2 {
    font-size: 20px;
  }

  .ha-gate-options {
    grid-template-columns: 1fr;
  }

  .ha-gate-option {
    min-height: 74px;
  }
}
