/* REDICO: compact three-field enquiries, 17 November 2026.
   A layer gives these scoped important declarations priority over legacy overrides. */
@layer redicoCompact {
html body :where(form[data-redico-lead],form.rx-lead-form,form#rx-orig-contact,form#quote-form) {
  --rdc-reserve: 400px;
}
html body form.rx-ux-form { --rdc-reserve: 480px; }
html body form#quote-form { --rdc-reserve: 420px; }
html.rd-compact-boot body :is(form[data-redico-lead],form.rx-lead-form,form#rx-orig-contact,form#quote-form):not([data-rd-ready]) {
  box-sizing: border-box !important;
  width: 100% !important;
  height: var(--rdc-reserve) !important;
  min-height: var(--rdc-reserve) !important;
  max-height: var(--rdc-reserve) !important;
  visibility: hidden !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
html.rd-compact-boot body #quote:not(:has(form[data-rd-ready])) > :is(.rdx-quote-heading,#quote-heading,p) {
  visibility: hidden !important;
}
html body .rd-compact-shell,
html body .rd-compact-form {
  --rdc-surface: var(--rdx-ui-surface, #fbfaf6);
  --rdc-ink: var(--rdx-ui-ink, #252429);
  --rdc-muted: var(--rdx-ui-muted, #57535a);
  --rdc-red: var(--rdx-ui-red, #ae222d);
  --rdc-line: color-mix(in srgb, var(--rdc-ink) 32%, var(--rdc-surface));
  box-sizing: border-box;
  min-width: 0 !important;
  min-height: 0 !important;
  color: var(--rdc-ink) !important;
}
html body form.rd-compact-form {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: var(--rdc-reserve, 400px) !important;
  padding: 22px !important;
  margin: 0 !important;
  border: 1px solid var(--rdc-line) !important;
  border-radius: 12px !important;
  background: var(--rdc-surface) !important;
  box-shadow: none !important;
  text-align: left !important;
}
html body .rd-compact-form .rd-compact-grid {
  display: grid !important;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: start !important;
}
html body .rd-compact-form .rd-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-width: 0 !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--rdc-ink) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}
html body .rd-compact-form .rd-field--full { grid-column: 1 / -1 !important; }
html body .rd-compact-form .rd-field__label {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--rdc-ink) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}
html body .rd-compact-form .rd-control {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid var(--rdc-line) !important;
  border-radius: 8px !important;
  background: var(--rdc-surface) !important;
  color: var(--rdc-ink) !important;
  -webkit-text-fill-color: var(--rdc-ink) !important;
  caret-color: var(--rdc-ink) !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
}
html body .rd-compact-form textarea.rd-control {
  height: 94px !important;
  min-height: 94px !important;
  max-height: 220px !important;
  resize: vertical !important;
}
html body .rd-compact-form .rd-control::placeholder { color: var(--rdc-muted) !important; -webkit-text-fill-color: var(--rdc-muted) !important; opacity: 1; }
html body .rd-compact-form .rd-control:focus-visible {
  outline: 2px solid var(--rdc-red) !important;
  outline-offset: 2px !important;
  border-color: var(--rdc-red) !important;
}
html body .rd-compact-form .rd-consent {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 9px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--rdc-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  cursor: pointer;
}
html body .rd-compact-form .rd-consent input[type="checkbox"] {
  appearance: auto !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 1px 0 0 !important;
  padding: 0 !important;
  accent-color: var(--rdc-red);
}
html body .rd-compact-form .rd-consent-copy,
html body .rd-compact-form .rd-consent-copy a {
  color: var(--rdc-muted) !important;
  -webkit-text-fill-color: var(--rdc-muted) !important;
  font: inherit !important;
}
html body .rd-compact-form .rd-privacy-note,
html body .rd-compact-form .rd-privacy-note small,
html body .rd-compact-form .rd-privacy-note a {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--rdc-muted) !important;
  -webkit-text-fill-color: var(--rdc-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
}
html body .rd-compact-form .rd-consent a,
html body .rd-compact-form .rd-privacy-note a { text-decoration: underline; text-underline-offset: 2px; }
html body .rd-compact-form .rd-submit {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 48px !important;
  height: auto !important;
  margin: 2px 0 0 !important;
  padding: 12px 16px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--rdc-red) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
  cursor: pointer;
}
html body .rd-compact-form .rd-submit:hover { background: var(--rdx-ui-red-hover, #941d26) !important; }
html body .rd-compact-form .rd-submit:disabled { opacity: .65; cursor: wait; }
html body .rd-compact-form .rd-submit:focus-visible { outline: 2px solid var(--rdc-ink); outline-offset: 3px; }
html body .rd-compact-form .rd-field-error { color: var(--rdc-red) !important; font-size: 12px !important; font-weight: 400; line-height: 1.4; }
html body .rd-compact-form .rd-field-hint { color: var(--rdc-muted); font-size: 12px; font-weight: 400; }
html body .rd-compact-form .rd-compact-context,
html body .rd-compact-form [hidden],
html body form.rd-compact-form[hidden] { display: none !important; }
/* Obsolete upload chrome and duplicate template policy notes. */
html body .rd-compact-form .rdx-attachment,
html body .rd-compact-form .rdx-privacy-note:not([data-rd-privacy-note]),
html body .rd-compact-form .rx-modal-policy,
html body .rd-compact-form .dc-optional,
html body .rd-compact-form .rr-upload-hint,
html body .rd-compact-form .rd-upload-hint { display: none !important; }
html body .rd-compact-form .rdx-form-status,
html body .rd-compact-form .rx-modal-msg { margin: 0 !important; font-size: 13px !important; line-height: 1.4 !important; }
html body .rd-compact-heading,
html body #quote-heading {
  margin: 0 42px 8px 0 !important;
  padding: 0 !important;
  color: var(--rdc-ink) !important;
  -webkit-text-fill-color: var(--rdc-ink) !important;
  font-size: 28px !important;
  font-weight: 750 !important;
  line-height: 1.15 !important;
  letter-spacing: -.025em !important;
}
html body .rd-compact-intro,
html body #quote-heading + p {
  margin: 0 0 20px !important;
  padding: 0 !important;
  color: var(--rdc-muted) !important;
  -webkit-text-fill-color: var(--rdc-muted) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}
html body .rd-compact-form .rx-ux-form__heading,
html body .rd-compact-form .rx-ux-form__heading strong {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--rdc-ink) !important;
  -webkit-text-fill-color: var(--rdc-ink) !important;
  font-size: 24px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
}
html body .rd-compact-form .rx-ux-form__context,
html body .rd-compact-form .rd-form-intro {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--rdc-muted) !important;
  -webkit-text-fill-color: var(--rdc-muted) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}
/* Both the theme modal and the native home-page dialog use one compact card. */
html body #rx-modal .rx-modal:has(form[data-redico-lead]),
html body #rdx-quote-dialog,
html body #rx-enc-lead-dialog:has(form.rx-lead-form) {
  box-sizing: border-box !important;
  width: 540px !important;
  max-width: calc(100vw - 32px) !important;
  height: 540px !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 48px) !important;
  padding: 28px !important;
  border: 1px solid color-mix(in srgb, var(--rdx-ui-ink, #252429) 20%, var(--rdx-ui-surface, #fbfaf6)) !important;
  border-radius: 16px !important;
  background: var(--rdx-ui-surface, #fbfaf6) !important;
  color: var(--rdx-ui-ink, #252429) !important;
  box-shadow: 0 24px 80px #0005 !important;
  overflow: auto !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}
html body #rx-modal .rx-modal:has(form[data-redico-lead]) { display: block !important; }
html body #rx-enc-lead-dialog:has(.rd-compact-form) > .rx-modal-k { display: none !important; }
html body #rx-modal .rx-modal-l { display: none !important; }
html body #rx-modal .rx-modal-r.rd-compact-shell,
html body #rdx-quote-dialog #quote {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html body #rx-modal .rd-compact-form,
html body #rdx-quote-dialog .rd-compact-form,
html body #rx-enc-lead-dialog .rd-compact-form {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
html body #rx-modal .rx-modal-close,
html body #rdx-quote-dialog .rdx-dialog-close,
html body #rdx-quote-dialog .rdx-quote-close,
html body #rx-enc-lead-dialog .rx-modal-x {
  box-sizing: border-box !important;
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 2 !important;
  color: var(--rdx-ui-ink, #252429) !important;
  background: transparent !important;
  border: 1px solid color-mix(in srgb, var(--rdx-ui-ink, #252429) 25%, transparent) !important;
  border-radius: 8px !important;
}
/* Inline enquiry on encyclopedia pages: content determines the height. */
html body .rx-lead-in:has(.rd-compact-form) { align-items: start !important; gap: 24px !important; padding: 28px !important; }
html body .rx-lead-box.rd-compact-shell { padding: 0 !important; height: auto !important; min-height: 0 !important; background: transparent !important; }
html body .rx-lead-in:has(.rd-compact-form) .rx-lead-txt { align-self: start !important; }
html body .rx-lead-in:has(.rd-compact-form) .rx-lead-txt h2 { font-size: 30px !important; line-height: 1.2 !important; }
html body .rx-lead-in:has(.rd-compact-form) .rx-lead-l,
html body .rx-lead-in:has(.rd-compact-form) .rx-lead-ul { font-size: 16px !important; line-height: 1.5 !important; }
html body .rx-lead-in:has(.rd-compact-form) .rx-lead-ul { margin-bottom: 0 !important; }
/* The confirmed response inherits the same theme and generous internal padding. */
html body .rd-compact-shell .rd-compact-success {
  box-sizing: border-box !important;
  display: grid !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 300px !important;
  margin: 0 !important;
  padding: 28px !important;
  border: 1px solid var(--rdc-line) !important;
  border-radius: 12px !important;
  background: var(--rdc-surface) !important;
  color: var(--rdc-ink) !important;
  text-align: left !important;
  box-shadow: none !important;
}
html body .rd-compact-success .rd-success-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #27816b18; color: #27816b; font-size: 28px; line-height: 1; }
html body .rd-compact-success .rd-success-title { margin: 0 !important; font-size: 28px !important; font-weight: 750 !important; line-height: 1.2 !important; }
html body .rd-compact-success .rd-success-copy { margin: 0 !important; color: var(--rdc-muted) !important; font-size: 16px !important; line-height: 1.5 !important; }
html body .rd-compact-complete > .rd-compact-heading,
html body .rd-compact-complete > .rd-compact-intro,
html body #rx-enc-lead-dialog.rd-compact-complete > .rx-modal-k,
html body #rx-enc-lead-dialog.rd-compact-complete > #rx-enc-lead-title,
html body #rx-enc-lead-dialog.rd-compact-complete > .rx-enc-modal-description { display: none !important; }
html body #rx-modal .rd-compact-success,
html body #rdx-quote-dialog .rd-compact-success,
html body #rx-enc-lead-dialog .rd-compact-success { min-height: 460px !important; border: 0 !important; padding: 24px !important; background: transparent !important; }
/* The partnership form is rendered by CF7 with the same three fields on the server. */
html body form.rd-partner-form > p,
html body .rd-partner-form .rd-partner-actions > p { margin: 0 !important; padding: 0 !important; }
html body .rd-partner-form .rd-compact-grid > p { display: contents !important; }
html body .rd-partner-form .rd-compact-grid br,
html body .rd-partner-form .rd-partner-consent br { display: none !important; }
html body .rd-partner-form .wpcf7-form-control-wrap { display: block !important; width: 100% !important; }
html body .rd-partner-form .rd-partner-consent .wpcf7-list-item { margin: 0 !important; }
html body .rd-partner-form .rd-partner-consent label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--rdc-muted) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}
html body .rd-partner-form .rd-partner-actions { position: relative; }
html body .rd-partner-form .wpcf7-spinner { position: absolute !important; right: 10px; top: 50%; margin: -12px 0 0 !important; }
html body .rd-partner-form .wpcf7-response-output { margin: 0 !important; padding: 10px !important; font-size: 13px !important; line-height: 1.45 !important; }
html body .rd-partner-form .wpcf7-response-output:empty { display: none !important; }
html body .rd-partner-form .wpcf7-not-valid-tip { color: var(--rdc-red) !important; font-size: 12px !important; line-height: 1.4 !important; }
@media (max-width: 640px) {
  html body :where(form[data-redico-lead],form.rx-lead-form,form#rx-orig-contact,form#quote-form) { --rdc-reserve: 500px; }
  html body form.rx-ux-form { --rdc-reserve: 580px; }
  html body form#quote-form { --rdc-reserve: 540px; }
  html body .rd-compact-form .rd-compact-grid { grid-template-columns: minmax(0, 1fr) !important; }
  html body form.rd-compact-form { padding: 18px !important; }
  html body #rx-modal .rx-modal:has(form[data-redico-lead]),
  html body #rdx-quote-dialog,
  html body #rx-enc-lead-dialog:has(form.rx-lead-form) { width: 100% !important; height: auto !important; padding: 24px 20px !important; max-width: calc(100vw - 24px) !important; max-height: calc(100dvh - 32px) !important; }
  html body #rx-modal .rd-compact-form,
  html body #rdx-quote-dialog .rd-compact-form,
  html body #rx-enc-lead-dialog .rd-compact-form { padding: 0 !important; }
  html body .rd-compact-heading { font-size: 25px !important; margin-right: 32px !important; }
  html body .rx-lead-in:has(.rd-compact-form) { padding: 20px !important; gap: 20px !important; }
  html body .rx-lead-in:has(.rd-compact-form) .rx-lead-txt h2 { font-size: 26px !important; }
  html body #rx-modal .rd-compact-success,
  html body #rdx-quote-dialog .rd-compact-success,
  html body #rx-enc-lead-dialog .rd-compact-success { min-height: 300px !important; padding: 20px 0 !important; }
}
/* Narrow phones need the same space before and after the consent text wraps. */
@media (max-width: 360px) {
  html body :where(form[data-redico-lead],form.rx-lead-form,form#rx-orig-contact,form#quote-form) { --rdc-reserve: 560px; }
  html body form.rx-ux-form { --rdc-reserve: 640px; }
  html body form#quote-form { --rdc-reserve: 580px; }
}
@media (max-height: 680px) and (min-width: 641px) {
  html body #rx-modal .rx-modal:has(form[data-redico-lead]),
  html body #rdx-quote-dialog,
  html body #rx-enc-lead-dialog:has(form.rx-lead-form) { height: auto !important; }
}

}

/* Keep the home popup as compact as the shared form. HOME uses a dark card
   in both themes, including controls; these rules share its priority layer. */
@layer redicoCompact.redicoHomeSEO20261117 {
  html body.home #rdx-quote-dialog :is(.rdx-eyebrow,.home-seo-form-hint,.rdx-trust-note,#home-mobile-tools) {
    display: none !important;
  }
  html body.home #rdx-quote-dialog .rdx-quote-heading {
    padding-right: 0 !important;
  }
  html body.home #rdx-quote-dialog #quote.rd-compact-complete > .rdx-quote-heading {
    display: none !important;
  }
  html body.home #rdx-quote-dialog .rd-compact-intro {
    margin: 0 0 12px !important;
  }
  html body.home #rdx-quote-dialog .rdx-quote-close {
    width: 44px !important;
    height: 44px !important;
    color: #f5f3ef !important;
    -webkit-text-fill-color: #f5f3ef !important;
    background: #252c37 !important;
    border: 1px solid #6a7685 !important;
  }
  html body.home #rdx-quote-dialog .rdx-quote-close:is(:hover,:focus-visible) {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: #354050 !important;
  }
  html body.home #rdx-quote-dialog .rdx-quote-close:focus-visible {
    outline: 2px solid #ffbdb3 !important;
    outline-offset: 2px !important;
  }
  html body.home #rdx-quote-dialog .rdx-quote-close svg {
    fill: none !important;
    stroke: currentColor !important;
  }
}
