:root {
  --editly-contact-plum: #461342;
  --editly-contact-violet: #6f2de8;
  --editly-contact-violet-dark: #5620bb;
  --editly-contact-ink: #24243d;
  --editly-contact-muted: #65667d;
  --editly-contact-line: #ddd9ed;
  --editly-contact-soft: #f8f6ff;
  --editly-contact-green: #087b52;
  --editly-contact-danger: #b42318;
  --editly-contact-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 .46'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

html.editly-contact-open,
body.editly-contact-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}
body.editly-contact-open {
  position: fixed;
  inset-inline: 0;
  top: var(--editly-contact-scroll-offset, 0);
  width: 100%;
  padding-right: var(--editly-contact-scrollbar-width, 0) !important;
}
.editly-contact [hidden] { display: none !important; }

.editly-contact {
  width: min(860px, calc(100vw - 32px));
  max-width: 860px;
  max-height: min(860px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  color: var(--editly-contact-ink);
  background: transparent;
  border: 0;
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 28px 90px rgba(42, 17, 70, .3);
}

.editly-contact::backdrop {
  background: rgba(24, 14, 35, .62);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.editly-contact__shell {
  max-height: min(860px, calc(100dvh - 32px));
  overflow: hidden auto;
  background: #fff;
  border: 0;
  border-radius: 14px;
}

.editly-contact__header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 22px 24px;
  color: #fff;
  background:
    var(--editly-contact-grain),
    radial-gradient(circle at 88% -24%, rgba(222, 85, 157, .34), transparent 46%),
    linear-gradient(125deg, #33102f, #671249 56%, #7d174f);
  background-size: 180px 180px, auto, auto;
  background-blend-mode: soft-light, normal, normal;
}

.editly-contact__brand {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 13px;
  box-shadow: inset 0 1px rgba(255,255,255,.28), 0 12px 28px rgba(21,5,35,.2);
  overflow: hidden;
}

.editly-contact__brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editly-contact__eyebrow {
  margin: 0 0 3px;
  color: #dfc9ff;
  font: 800 11px/1.2 Manrope, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.editly-contact__header h2 {
  margin: 0;
  color: #fff;
  font: 700 clamp(24px, 3vw, 34px)/1.12 "Sorts Mill Goudy", Georgia, serif;
}

.editly-contact__close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  cursor: pointer;
}

.editly-contact__close:hover { background: rgba(255,255,255,.19); }
.editly-contact__close:focus-visible,
.editly-contact button:focus-visible,
.editly-contact a:focus-visible,
.editly-contact input:focus-visible,
.editly-contact select:focus-visible,
.editly-contact textarea:focus-visible {
  outline: 3px solid #bca0ff;
  outline-offset: 3px;
}

.editly-contact__body { padding: clamp(22px, 4vw, 38px); }
.editly-contact__chooser > h3,
.editly-contact__success h3 {
  margin: 0 0 8px;
  color: var(--editly-contact-plum);
  font: 700 clamp(25px, 3vw, 34px)/1.15 "Sorts Mill Goudy", Georgia, serif;
}
.editly-contact__chooser > p { margin: 0 0 24px; color: var(--editly-contact-muted); }
.editly-contact__types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.editly-contact__type {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 13px;
  align-items: center;
  min-height: 84px;
  padding: 14px 16px;
  color: var(--editly-contact-ink);
  text-align: left;
  background: linear-gradient(135deg, #fff, var(--editly-contact-soft));
  border: 1px solid var(--editly-contact-line);
  border-radius: 17px;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.editly-contact__type:hover { transform: translateY(-2px); border-color: #ad8be9; box-shadow: 0 12px 28px rgba(76,31,113,.1); }
.editly-contact__type-icon,
.editly-contact__context > span,
.editly-contact-prompt__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--editly-contact-violet);
  font-weight: 800;
  background: #eee7ff;
  border-radius: 13px;
}
.editly-contact__type strong { display: block; margin-bottom: 3px; font: 750 14px/1.25 Manrope, sans-serif; }
.editly-contact__type small { display: block; color: var(--editly-contact-muted); font: 500 12px/1.35 Manrope, sans-serif; }
.editly-contact__type > span:last-child { color: var(--editly-contact-violet); font-size: 19px; }

.editly-contact__back {
  margin: 0 0 15px;
  padding: 0;
  color: var(--editly-contact-violet-dark);
  font-weight: 750;
  background: none;
  border: 0;
  cursor: pointer;
}
.editly-contact__context {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  align-items: center;
  margin-bottom: 22px;
  padding: 15px;
  background: var(--editly-contact-soft);
  border: 1px solid #e6ddf8;
  border-radius: 17px;
}
.editly-contact__context strong { color: var(--editly-contact-plum); }
.editly-contact__context p { margin: 3px 0 0; color: var(--editly-contact-muted); font-size: 13px; }
.editly-contact__portal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin: 0 0 20px;
  padding: 17px 18px;
  color: #104d3a;
  background: #edf9f4;
  border: 1px solid #b9e5d3;
  border-radius: 17px;
}
.editly-contact__portal[hidden] { display: none; }
.editly-contact__portal p { margin: 4px 0 0; font-size: 13px; }
.editly-contact__portal a { color: #075f43; font-weight: 800; white-space: nowrap; }

.editly-contact__form label { display: block; color: #34344f; font: 750 13px/1.4 Manrope, sans-serif; }
.editly-contact__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 15px; }
.editly-contact__form > label { margin-bottom: 15px; }
.editly-contact input,
.editly-contact select,
.editly-contact textarea {
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  color: var(--editly-contact-ink);
  font: 500 15px/1.45 Manrope, sans-serif;
  background: #fff;
  border: 1px solid #cfc9df;
  border-radius: 11px;
  box-shadow: inset 0 1px 2px rgba(24,14,35,.03);
}
.editly-contact textarea { min-height: 132px; resize: vertical; }
.editly-contact label > small { display: block; margin-top: 6px; color: var(--editly-contact-muted); font-weight: 500; }
.editly-contact [aria-invalid="true"] { border-color: var(--editly-contact-danger); box-shadow: 0 0 0 3px rgba(180,35,24,.08); }
.editly-contact__field-error { color: var(--editly-contact-danger) !important; }
.editly-contact__technical {
  margin: 5px 0 18px;
  padding: 13px 15px;
  background: #fbfaff;
  border: 1px solid var(--editly-contact-line);
  border-radius: 14px;
}
.editly-contact__technical summary { color: var(--editly-contact-violet-dark); font-weight: 800; cursor: pointer; }
.editly-contact__technical > p { color: var(--editly-contact-muted); font-size: 13px; }
.editly-contact__grid--versions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.editly-contact__challenge {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0;
}
.editly-contact__challenge button { min-height: 45px; padding: 0 14px; color: var(--editly-contact-violet-dark); font-weight: 750; background: #f4efff; border: 1px solid #d8c9f7; border-radius: 11px; cursor: pointer; }
.editly-contact__feedback { min-height: 0; margin: 0 0 10px; }
.editly-contact__feedback.is-error { padding: 11px 13px; color: #8b1f17; background: #fff2f0; border: 1px solid #f1b9b3; border-radius: 11px; }
.editly-contact__actions { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding-top: 17px; border-top: 1px solid #ebe8f3; }
.editly-contact__actions p { max-width: 470px; margin: 0; color: var(--editly-contact-muted); font-size: 12px; line-height: 1.55; }
.editly-contact__actions a { color: var(--editly-contact-violet-dark); }
.editly-contact__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 48px;
  padding: 0 21px;
  color: #fff;
  font: 800 14px/1 Manrope, sans-serif;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--editly-contact-violet), #9143df);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(111,45,232,.24);
  cursor: pointer;
}
.editly-contact__submit:disabled { opacity: .62; cursor: wait; }
.editly-contact__success { padding: 34px 10px 24px; text-align: center; }
.editly-contact__success-icon { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 18px; color: #fff; font-size: 30px; font-weight: 800; background: var(--editly-contact-green); border-radius: 50%; box-shadow: 0 13px 30px rgba(8,123,82,.24); }
.editly-contact__success > p { max-width: 520px; margin: 0 auto 20px; color: var(--editly-contact-muted); }
.editly-contact__request { display: inline-flex; gap: 9px; padding: 10px 14px; background: #f4f1fa; border-radius: 10px; }
.editly-contact__request span { color: var(--editly-contact-muted); }
.editly-contact__success .editly-contact__submit { margin-top: 8px; }
.editly-contact__honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.nav-contact {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
}
.nav-contact:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.nav-mobile-contact { display: none !important; }

.editly-contact-prompt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  max-width: 930px;
  margin: 24px auto 0;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(120deg, #351239, #5c1a62);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(50,18,65,.18);
}
.editly-contact-prompt__icon { color: #fff; background: rgba(255,255,255,.13); }
.editly-contact-prompt strong { display: block; margin-bottom: 2px; }
.editly-contact-prompt p { margin: 0; color: #e5d8eb; font-size: 13px; }
.editly-contact-prompt__button { min-height: 43px; padding: 0 17px; color: var(--editly-contact-plum); font-weight: 800; background: #fff; border: 0; border-radius: 11px; cursor: pointer; }

@media (max-width: 900px) {
  .nav-contact { display: none; }
  .nav-mobile-contact { display: flex !important; }
}

@media (max-width: 680px) {
  .editly-contact { width: 100vw; max-width: none; max-height: 100dvh; margin: 0; border-radius: 0; }
  .editly-contact__shell { min-height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .editly-contact__header { padding: 17px 18px; }
  .editly-contact__brand { width: 42px; height: 42px; }
  .editly-contact__body { padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
  .editly-contact__types,
  .editly-contact__grid,
  .editly-contact__grid--versions { grid-template-columns: 1fr; }
  .editly-contact__type { min-height: 72px; }
  .editly-contact__portal { grid-template-columns: 1fr; }
  .editly-contact__challenge { grid-template-columns: 1fr auto; }
  .editly-contact__actions { align-items: stretch; flex-direction: column; }
  .editly-contact__submit { width: 100%; }
  .editly-contact-prompt { grid-template-columns: auto 1fr; margin-inline: 10px; }
  .editly-contact-prompt__button { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 420px) {
  .editly-contact__header { grid-template-columns: auto 1fr auto; gap: 10px; }
  .editly-contact__brand { display: grid; width: 36px; height: 36px; border-radius: 10px; }
  .editly-contact__header h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .editly-contact *, .editly-contact-prompt * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
