/* Standalone lead intake component. It is loaded after the Labs system styles. */
#lugano-lead-dialog {
  --lead-ink: #14203e;
  --lead-muted: #5e6a7d;
  --lead-paper: #f8f7f2;
  --lead-card: #fffefa;
  --lead-blue: #285b99;
  --lead-blue-deep: #173d72;
  --lead-lake: #dce9ee;
  --lead-line: rgba(20, 32, 62, .14);
  --lead-error: #a34235;
  width: min(760px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: min(820px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 24px;
  color: var(--lead-ink);
  background: var(--lead-paper);
  box-shadow: 0 28px 90px rgba(7, 20, 50, .42), 0 2px 0 rgba(255, 255, 255, .75) inset;
  color-scheme: light;
}

#lugano-lead-dialog:not([open]) { display: none; }

#lugano-lead-dialog::backdrop {
  background: rgba(9, 21, 48, .74);
  backdrop-filter: blur(8px) saturate(.82);
}

#lugano-lead-dialog [hidden] { display: none !important; }

.lugano-lead__frame {
  position: relative;
  max-height: min(820px, calc(100dvh - 32px));
  padding: clamp(22px, 2.6vw, 28px) clamp(22px, 3vw, 30px) 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(20, 32, 62, .28) transparent;
  background:
    radial-gradient(82% 49% at 100% 0%, rgba(112, 168, 191, .23), transparent 68%),
    linear-gradient(135deg, rgba(255, 255, 255, .78), transparent 47%),
    var(--lead-paper);
}

.lugano-lead__frame::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    repeating-linear-gradient(116deg, rgba(20, 32, 62, .12) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(23deg, rgba(255, 255, 255, .72) 0 1px, transparent 1px 7px);
  content: "";
  mix-blend-mode: soft-light;
}

.lugano-lead__frame > * { position: relative; z-index: 1; }

.lugano-lead__masthead,
.lugano-lead__progress,
.lugano-lead__field-row,
.lugano-lead__actions,
.lugano-lead__field-meta { display: flex; }

.lugano-lead__masthead {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.lugano-lead__brand,
.lugano-lead__eyebrow,
.lugano-lead__progress,
.lugano-lead__context,
.lugano-lead__reference span {
  margin: 0;
  color: var(--lead-blue-deep);
  font-family: var(--v2-sans, "Manrope", -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .115em;
  line-height: 1.35;
  text-transform: uppercase;
}

.lugano-lead__brand span { margin-inline: .45em; color: rgba(23, 61, 114, .52); }

.lugano-lead__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--lead-line);
  border-radius: 50%;
  padding: 0;
  color: var(--lead-ink);
  background: rgba(255, 254, 250, .68);
  font-family: var(--v2-sans, sans-serif);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.lugano-lead__close:hover {
  border-color: rgba(20, 32, 62, .32);
  background: #fffefa;
  transform: rotate(4deg);
}

.lugano-lead__progress {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.lugano-lead__progress-count { color: var(--lead-muted); font-family: var(--v2-mono, ui-monospace, monospace); font-size: 9px; letter-spacing: .08em; }

.lugano-lead__progress-rule {
  height: 2px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 32, 62, .12);
}

.lugano-lead__progress-rule span {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lead-blue-deep), #5f9fba);
  transition: width .24s ease;
}

.lugano-lead__context {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  color: #406486;
  letter-spacing: .08em;
}

.lugano-lead__context span { color: rgba(20, 32, 62, .56); }
.lugano-lead__context strong { color: var(--lead-ink); font-weight: 750; letter-spacing: .025em; text-transform: none; }

.lugano-lead__form { margin-top: 14px; }

.lugano-lead__step > h2,
.lugano-lead__success h2 {
  max-width: 610px;
  margin: 0;
  color: var(--lead-ink);
  font-family: var(--v2-sans, "Manrope", -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: clamp(25px, 2.9vw, 30px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.lugano-lead__introduction,
.lugano-lead__success > p:not(.lugano-lead__eyebrow):not(.lugano-lead__reference) {
  max-width: 600px;
  margin: 8px 0 0;
  color: var(--lead-muted);
  font-size: 14px;
  line-height: 1.5;
}

.lugano-lead__field-group,
.lugano-lead__priority-list {
  min-width: 0;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

/* Legend and its hint share one line. */
.lugano-lead__field-group > legend { float: left; margin-right: 8px; }
.lugano-lead__field-group > .lugano-lead__field-help { margin: 1px 0 0; }

.lugano-lead__field-group > legend,
.lugano-lead__field > span:first-child {
  display: block;
  margin: 0;
  color: var(--lead-ink);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -.01em;
  line-height: 1.45;
}

.lugano-lead__field-group > legend span,
.lugano-lead__field > span:first-child i { color: var(--lead-error); font-style: normal; }

.lugano-lead__field > span:first-child em {
  margin-left: 7px;
  color: var(--lead-muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .01em;
}

.lugano-lead__field-help,
.lugano-lead__field-meta small {
  margin: 5px 0 0;
  color: var(--lead-muted);
  font-size: 12px;
  line-height: 1.45;
}

.lugano-lead__choice-grid {
  display: grid;
  clear: both;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

@media (min-width: 640px) {
  .lugano-lead__choice-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.lugano-lead__choice { position: relative; display: block; min-width: 0; cursor: pointer; }
/* A choice left alone on the last row (the fifth, review, since 4 Nov 2026) takes the whole row. */
.lugano-lead__choice:last-child:nth-child(odd) { grid-column: 1 / -1; }

.lugano-lead__choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.lugano-lead__choice > span {
  display: grid;
  min-height: 56px;
  height: 100%;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--lead-line);
  border-radius: 12px;
  padding: 11px 13px;
  background: rgba(255, 254, 250, .72);
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.lugano-lead__choice b { color: var(--lead-ink); font-size: 12px; font-weight: 750; line-height: 1.35; }
.lugano-lead__choice small { color: var(--lead-muted); font-size: 11px; line-height: 1.35; }
.lugano-lead__choice:hover > span { border-color: rgba(40, 91, 153, .42); background: #fffefa; transform: translateY(-1px); }
.lugano-lead__choice input:checked + span { border-color: var(--lead-blue); color: #fffefa; background: var(--lead-blue-deep); box-shadow: 0 8px 18px rgba(23, 61, 114, .17); }
.lugano-lead__choice input:checked + span b { color: #fffefa; }
.lugano-lead__choice input:checked + span small { color: rgba(255, 254, 250, .72); }
.lugano-lead__choice input:focus-visible + span { outline: 2px solid var(--lead-blue); outline-offset: 3px; }

.lugano-lead__field {
  display: block;
  min-width: 0;
  margin-top: 14px;
}

.lugano-lead__field-row {
  align-items: flex-start;
  gap: 14px;
}

.lugano-lead__field-row > .lugano-lead__field { width: calc(50% - 7px); }
.lugano-lead__product-area .lugano-lead__field { max-width: calc(50% - 7px); margin-top: 14px; }

.lugano-lead__field input,
.lugano-lead__field textarea,
.lugano-lead__field select {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--lead-line);
  border-radius: 10px;
  padding: 12px 13px;
  color: var(--lead-ink);
  background: rgba(255, 254, 250, .78);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset;
  font-family: var(--v2-sans, "Manrope", -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 14px;
  line-height: 1.45;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.lugano-lead__field input { min-height: 47px; }
.lugano-lead__field textarea { min-height: 80px; resize: vertical; }
.lugano-lead__funding .lugano-lead__field textarea { min-height: 47px; }

.lugano-lead__field select {
  min-height: 47px;
  padding-right: 35px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--lead-blue-deep) 50%), linear-gradient(135deg, var(--lead-blue-deep) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.lugano-lead__field input::placeholder,
.lugano-lead__field textarea::placeholder { color: #8390a0; opacity: 1; }

.lugano-lead__field input:hover,
.lugano-lead__field textarea:hover,
.lugano-lead__field select:hover { border-color: rgba(20, 32, 62, .3); }

.lugano-lead__field input:focus,
.lugano-lead__field textarea:focus,
.lugano-lead__field select:focus {
  border-color: var(--lead-blue);
  outline: 0;
  background-color: #fffefa;
  box-shadow: 0 0 0 3px rgba(40, 91, 153, .13);
}

.lugano-lead__field-meta {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lugano-lead__field-meta small:last-child { font-family: var(--v2-mono, ui-monospace, monospace); font-size: 9px; white-space: nowrap; }

/* Optional extras for Private beta and Funding share one row when both show. */
.lugano-lead__extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 14px; }
.lugano-lead__extras:has(> [data-lead-product-area]:not([hidden])):not(:has(> [data-lead-funding-note]:not([hidden]))) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.lugano-lead__extras .lugano-lead__product-area .lugano-lead__field { max-width: none; }
.lugano-lead__funding .lugano-lead__field { position: relative; }
.lugano-lead__funding .lugano-lead__field-meta { position: absolute; top: 0; right: 0; }
.lugano-lead__funding .lugano-lead__field-meta small:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lugano-lead__funding .lugano-lead__field-meta small { margin: 0; }

.lugano-lead__details {
  margin-top: 16px;
  border-top: 1px solid var(--lead-line);
  border-bottom: 1px solid var(--lead-line);
}

.lugano-lead__details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--lead-blue-deep);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  list-style: none;
}

.lugano-lead__details summary em { margin-left: 7px; margin-right: auto; color: var(--lead-muted); font-size: 10px; font-style: normal; font-weight: 600; }
.lugano-lead__details summary::-webkit-details-marker { display: none; }
.lugano-lead__details summary::after { color: var(--lead-muted); content: "+"; font-size: 19px; font-weight: 400; transition: transform .16s ease; }
.lugano-lead__details[open] summary::after { transform: rotate(45deg); }

.lugano-lead__priority-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.lugano-lead__details > .lugano-lead__field { margin: 0 0 15px; }

.lugano-lead__priority-list label { position: relative; display: block; cursor: pointer; }
.lugano-lead__priority-list input { position: absolute; opacity: 0; pointer-events: none; }
.lugano-lead__priority-list label span {
  display: block;
  border: 1px solid var(--lead-line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--lead-muted);
  background: rgba(255, 254, 250, .76);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}

.lugano-lead__priority-list input:checked + span { border-color: var(--lead-blue); color: #fffefa; background: var(--lead-blue); }
.lugano-lead__priority-list input:focus-visible + span { outline: 2px solid var(--lead-blue); outline-offset: 3px; }

.lugano-lead__field-error {
  display: block;
  margin: 7px 0 0;
  color: var(--lead-error);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}

.lugano-lead__field.is-invalid input,
.lugano-lead__field.is-invalid textarea,
.lugano-lead__field.is-invalid select,
.lugano-lead__field-group.is-invalid .lugano-lead__choice > span,
.lugano-lead__priority-list.is-invalid label span { border-color: rgba(163, 66, 53, .72); }

.lugano-lead__error-summary {
  margin-bottom: 20px;
  border-left: 3px solid var(--lead-error);
  border-radius: 2px 9px 9px 2px;
  padding: 10px 13px;
  color: #7e2f25;
  background: rgba(231, 205, 198, .54);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

/* The action bar stays pinned to the bottom of the dialog, so Continue and Send are always in view. */
.lugano-lead__actions {
  position: sticky;
  z-index: 2;
  bottom: 0;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 0 clamp(22px, 2.6vw, 28px);
  background: linear-gradient(to bottom, rgba(248, 247, 242, 0), var(--lead-paper) 14px);
}

.lugano-lead__actions--forward { justify-content: flex-end; }

.lugano-lead__button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 19px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 11px 17px;
  font-family: var(--v2-sans, "Manrope", -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.lugano-lead__button--primary {
  color: #fffefa;
  background: var(--lead-blue-deep);
  box-shadow: 0 8px 17px rgba(23, 61, 114, .16);
}

.lugano-lead__button--primary:hover:not(:disabled) { background: #102f5f; box-shadow: 0 10px 22px rgba(23, 61, 114, .21); transform: translateY(-1px); }
.lugano-lead__button--secondary { border-color: var(--lead-line); color: var(--lead-blue-deep); background: transparent; }
.lugano-lead__button--secondary:hover:not(:disabled) { border-color: rgba(20, 32, 62, .32); background: rgba(255, 254, 250, .72); }
.lugano-lead__button:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; transform: none; }

.lugano-lead__privacy {
  margin: 14px 0 0;
  color: var(--lead-muted);
  font-size: 10px;
  line-height: 1.55;
}

.lugano-lead__mode-notice {
  margin: 13px 0 0;
  border: 1px solid rgba(40, 91, 153, .18);
  border-radius: 9px;
  padding: 9px 11px;
  color: #315b7c;
  background: rgba(220, 233, 238, .58);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}

.lugano-lead__privacy a,
.lugano-lead__fallback a { color: var(--lead-blue-deep); font-weight: 750; text-decoration: underline; text-decoration-color: rgba(23, 61, 114, .38); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.lugano-lead__status {
  min-height: 1.45em;
  margin-top: 17px;
  color: var(--lead-muted);
  font-size: 11px;
  line-height: 1.5;
}

.lugano-lead__status:empty { display: none; }
/* When the fallback box shows, it already says the enquiry cannot be sent; skip the duplicate status line. */
.lugano-lead__status:has(+ .lugano-lead__fallback:not([hidden])) { display: none; }

.lugano-lead__status[data-tone="error"] { color: var(--lead-error); font-weight: 650; }
.lugano-lead__status[data-tone="pending"] { color: var(--lead-blue-deep); font-weight: 650; }

.lugano-lead__fallback {
  margin: 9px 0 0;
  border-radius: 10px;
  padding: 12px 13px;
  color: #654f40;
  background: #f3e8da;
  font-size: 11px;
  line-height: 1.55;
}

.lugano-lead__success { margin-top: 28px; }
.lugano-lead__success .lugano-lead__actions { margin-top: 28px; }
.lugano-lead__reference { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 0; }
.lugano-lead__reference strong { color: var(--lead-blue-deep); font-family: var(--v2-mono, ui-monospace, monospace); font-size: 11px; font-weight: 650; letter-spacing: .015em; }

.lugano-lead[data-state="success"] .lugano-lead__status,
.lugano-lead[data-state="success"] .lugano-lead__fallback { display: none; }

.lugano-lead__honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

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

.lugano-lead :focus-visible { outline: 2px solid var(--lead-blue); outline-offset: 4px; }
/* Headings take focus only so screen readers announce the step; they are not controls. */
.lugano-lead h2[tabindex="-1"]:focus,
.lugano-lead__success:focus { outline: none; }
.lugano-lead__field input:focus-visible,
.lugano-lead__field textarea:focus-visible,
.lugano-lead__field select:focus-visible { outline: 0; }

body.lugano-lead-is-open { overflow: hidden; }

@media (max-width: 560px) {
  .lugano-lead__extras, .lugano-lead__extras:has(> [data-lead-product-area]:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  #lugano-lead-dialog { width: min(100vw - 18px, 724px); max-width: calc(100vw - 18px); max-height: calc(100dvh - 18px); border-radius: 19px; }
  .lugano-lead__frame { max-height: calc(100dvh - 18px); padding: 20px 18px 0; }
  .lugano-lead__form { margin-top: 12px; }
  .lugano-lead__step > h2,
  .lugano-lead__success h2 { font-size: clamp(28px, 8vw, 32px); }
  .lugano-lead__choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lugano-lead__choice > span { min-height: 54px; padding: 9px 11px; }
  .lugano-lead__field-row:not(.lugano-lead__field-row--keep) { display: block; }
  .lugano-lead__field-row:not(.lugano-lead__field-row--keep) > .lugano-lead__field { width: auto; }
  .lugano-lead__product-area .lugano-lead__field { max-width: none; }
  .lugano-lead__actions { padding-bottom: 18px; }
  .lugano-lead__actions { align-items: stretch; }
  .lugano-lead__actions:not(.lugano-lead__actions--forward) { flex-direction: column-reverse; }
  .lugano-lead__button { width: 100%; }
  .lugano-lead__actions--forward .lugano-lead__button { width: auto; }
}

/* Short laptop screens and phones: tighten spacing so step one still fits. */
@media (max-height: 760px), (max-width: 560px) {
  .lugano-lead__frame { padding-top: 18px; }
  .lugano-lead__progress { margin-top: 8px; }
  .lugano-lead__form { margin-top: 10px; }
  .lugano-lead__step > h2 { font-size: 30px; }
  .lugano-lead__introduction { margin-top: 6px; }
  .lugano-lead__field-group { margin-top: 12px; }
  .lugano-lead__choice > span { min-height: 50px; padding-block: 9px; }
  .lugano-lead__field { margin-top: 12px; }
  .lugano-lead__field textarea { min-height: 70px; }
  .lugano-lead__actions { margin-top: 12px; padding-bottom: 20px; }
}

@media (max-width: 767px) {
  .lugano-lead__field input,
  .lugano-lead__field textarea,
  .lugano-lead__field select { font-size: 16px; }
}

@media (max-width: 380px) {
  .lugano-lead__frame { padding-inline: 17px; }
  .lugano-lead__brand { font-size: 9px; }
  .lugano-lead__step > h2,
  .lugano-lead__success h2 { font-size: 28px; }
}

@media (max-width: 359px) {
  .lugano-lead__choice-grid { grid-template-columns: 1fr; }
  .lugano-lead__choice > span { min-height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .lugano-lead *, .lugano-lead *::before, .lugano-lead *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Block system (3 Nov 2026): square panels, one small radius for controls, the logo blue for the main action. */
#lugano-lead-dialog { border-radius: 0; }
.lugano-lead__close,
.lugano-lead__choice > span,
.lugano-lead__field input,
.lugano-lead__field select,
.lugano-lead__field textarea,
.lugano-lead__priority-list label span,
.lugano-lead__error-summary,
.lugano-lead__button,
.lugano-lead__mode-notice,
.lugano-lead__fallback { border-radius: 3px; }
.lugano-lead__progress-rule,
.lugano-lead__progress-rule span { border-radius: 0; }
.lugano-lead__choice input:checked + span { border-color: #194987; background: #194987; box-shadow: none; }
.lugano-lead__button--primary { background: #194987; box-shadow: none; }
.lugano-lead__button--primary:hover:not(:disabled) { background: #12376a; box-shadow: none; transform: none; }
/* Fade the text with the fill, so a chosen card never flashes white on white. */
.lugano-lead__choice > span,
.lugano-lead__choice b,
.lugano-lead__choice small { transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease; }
.lugano-lead__mode-notice { background: #efede6; color: #3c4a63; }

/* Cloudflare Turnstile spam check (lead-form.js). Empty, and so hidden, when the form runs locally. */
.lugano-lead__check { min-height: 65px; margin: 18px 0 2px; }
.lugano-lead__check:empty { display: none; }
