:root {
  --kh-forest: #0d3b33;
  --kh-rust: #b86535;
  --kh-rust-dark: #8f4826;
  --kh-warm-white: #faf7f1;
  --kh-ink: #15201d;
  --kh-muted: #5f6b66;
  --kh-line: #ded7cc;
}

.kh-gate-button {
  border: 1px solid var(--kh-line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  min-height: 46px;
  padding: 0.8rem 1rem;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.kh-gate-primary {
  background: var(--kh-forest);
  border-color: var(--kh-forest);
  color: #fff;
}

.kh-gate-secondary {
  background: #fff;
  border-color: var(--kh-rust);
  color: var(--kh-rust-dark);
}

.kh-gate-ghost {
  background: var(--kh-warm-white);
  color: var(--kh-forest);
}

.kh-gate-button:hover,
.kh-gate-button:focus-visible {
  border-color: var(--kh-rust);
}

.kh-dialog-root {
  display: none;
  inset: 0;
  position: fixed;
  z-index: 1000;
}

.kh-dialog-root.is-open {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.kh-dialog-backdrop {
  background: rgba(13, 31, 26, 0.64);
  inset: 0;
  position: absolute;
}

.kh-dialog {
  background: var(--kh-warm-white);
  border: 1px solid rgba(184, 101, 53, 0.35);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(21, 32, 29, 0.34);
  color: var(--kh-ink);
  max-width: 440px;
  padding: 1.25rem;
  position: relative;
  width: min(100%, 440px);
}

.kh-dialog-close {
  align-items: center;
  background: #fff;
  border: 1px solid var(--kh-line);
  border-radius: 999px;
  color: var(--kh-ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  height: 44px;
  justify-content: center;
  position: absolute;
  right: 0.85rem;
  top: 0.85rem;
  width: 44px;
}

.kh-dialog-kicker {
  color: var(--kh-rust-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 3rem 0.35rem 0;
  text-transform: uppercase;
}

.kh-dialog h2 {
  color: var(--kh-forest);
  font-size: 1.45rem;
  line-height: 1.15;
  margin: 0 3rem 0.5rem 0;
}

.kh-dialog-copy {
  color: var(--kh-muted);
  margin: 0 0 1rem 0;
}

.kh-dialog-form {
  display: grid;
  gap: 0.85rem;
}

.kh-dialog-form label {
  color: var(--kh-ink);
  display: grid;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.35rem;
}

.kh-dialog-form input[type='text'],
.kh-dialog-form input:not([type]) {
  background: #fff;
  border: 1px solid var(--kh-line);
  border-radius: 8px;
  color: var(--kh-ink);
  font: inherit;
  min-height: 46px;
  padding: 0.7rem 0.8rem;
}

.kh-dialog-form input:focus {
  border-color: var(--kh-rust);
  outline: 3px solid rgba(184, 101, 53, 0.22);
}

.kh-consent {
  align-items: start;
  display: grid;
  font-weight: 600;
  grid-template-columns: 22px 1fr;
}

.kh-consent input {
  margin-top: 0.18rem;
}

.kh-honeypot {
  left: -10000px;
  position: absolute;
}

.kh-submit {
  background: var(--kh-rust);
  border: 1px solid var(--kh-rust);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 48px;
  padding: 0.8rem 1rem;
}

.kh-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.kh-status {
  color: var(--kh-muted);
  margin: 0;
  min-height: 1.35rem;
}

.kh-status.is-error {
  color: #9f2d20;
}

.kh-status.is-success {
  color: var(--kh-forest);
  font-weight: 750;
}

.kh-asset-result {
  margin: 0;
}

.kh-unlocked-asset {
  color: var(--kh-rust-dark);
  font-weight: 800;
}

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

.floor-plan {
  position: relative;
}

.floor-plan [data-kh-plan-gated='true'] img {
  filter: saturate(0.85);
}

.kh-plan-media {
  display: block;
  min-height: 72px;
  position: relative;
}

.kh-plan-media > a {
  display: block;
}

.kh-plan-media img {
  display: block;
  width: 100%;
}

.kh-plan-lock {
  align-items: center;
  background: rgba(13, 59, 51, 0.92);
  border: 1px solid rgba(250, 247, 241, 0.8);
  border-radius: 8px;
  bottom: 0.75rem;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  justify-content: center;
  left: 50%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  position: absolute;
  transform: translateX(-50%);
}

.kh-plan-unlocked .kh-plan-lock {
  display: none;
}

body.kh-dialog-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .kh-dialog-root.is-open {
    align-items: end;
    padding: 0;
  }

  .kh-dialog {
    border-radius: 8px 8px 0 0;
    max-width: none;
    width: 100%;
  }
}

/* WhatsApp link: same footprint as a secondary gate, WhatsApp green kept to the border mark. */
.kh-whatsapp {
  align-items: center;
  background: #fff;
  border: 1px solid #25d366;
  border-radius: 8px;
  color: var(--kh-forest);
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1rem;
  text-decoration: none;
}

.kh-whatsapp:hover {
  background: #effaf3;
}

.action-stack .kh-whatsapp {
  font-size: 14px;
}

.kh-gate-light {
  background: var(--kh-warm-white);
  border-color: var(--kh-warm-white);
  color: var(--kh-forest);
}

.kh-gate-light:hover {
  background: #fff;
}

.kh-hub-cta {
  background: var(--kh-forest);
  border-radius: 8px;
  color: #fff;
  margin-top: 48px;
  padding: 28px 24px;
}

.kh-hub-cta h2 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 8px;
}

.kh-hub-cta p {
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 20px;
  max-width: 560px;
}

.kh-hub-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kh-hub-cta .kh-whatsapp {
  background: transparent;
  color: #fff;
}

.kh-hub-cta .kh-whatsapp:hover {
  background: rgba(255, 255, 255, 0.08);
}

.kh-mobile-cta {
  display: none;
}

@media (max-width: 680px) {
  body:has(.kh-mobile-cta) {
    padding-bottom: 84px;
  }

  .kh-mobile-cta {
    background: #fffdf8;
    border-top: 1px solid var(--kh-line);
    bottom: 0;
    box-shadow: 0 -8px 24px rgba(30, 39, 34, 0.12);
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    left: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 60;
  }

  .kh-mobile-cta > * {
    font-size: 14px;
    padding: 0.7rem 0.5rem;
  }
}
