/* Shared by the dialog, shortcode and the standalone page. */
.wpi-form {
  --wpi-ink: var(--color-ink, #071219);
  --wpi-accent: var(--color-accent, #c39f6e);
  --wpi-surface: var(--color-surface, #f5f5f5);
  --wpi-line: #dfe1e2;
  color: var(--wpi-ink);
  font-family: var(--font-sans, "Montserrat", ui-sans-serif, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.6;
  max-width: 1080px;
  margin-inline: auto;
  text-align: left;
}
.wpi-form *, .wpi-dialog * { box-sizing: border-box; }
.wpi-form :is(h2, h3, p, figure, fieldset) { margin: 0; }
.wpi-form fieldset { border: 0; padding: 0; min-width: 0; }
.wpi-form button, .wpi-form input, .wpi-form textarea { font: inherit; }
.wpi-form button, .wpi-upload-target, .wpi-choice { -webkit-tap-highlight-color: transparent; }
.wpi-form svg { flex-shrink: 0; }
.wpi-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); background: white; border-radius: 14px; overflow: hidden; }
.wpi-context { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; padding: 40px 28px 28px; background: var(--wpi-ink); color: white; min-width: 0; }
.wpi-eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: .16em; line-height: 1.7; text-transform: uppercase; }
.wpi-context .wpi-eyebrow { color: var(--wpi-accent); }
.wpi-context h2 { font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -.04em; margin-top: 8px; overflow-wrap: anywhere; }
.wpi-code { font-size: 12px; color: #aab4ba; margin-top: 10px !important; letter-spacing: .06em; }
.wpi-context-image { width: 100%; border-radius: 4px; overflow: hidden; background: #24313a; }
.wpi-photo { display: block; width: 100%; aspect-ratio: 1.22; height: auto; object-fit: cover; }
.wpi-context-description { margin-top: auto; padding-top: 12px; }
.wpi-context-rule { display: block; height: 2px; width: 36px; margin-bottom: 24px; background: var(--wpi-accent); }
.wpi-context-title { font-size: 27px; line-height: 1.25; letter-spacing: -.035em; font-weight: 600; margin-bottom: 16px !important; }
.wpi-context-description > p:last-child { color: #b2bbc1; font-size: 13px; line-height: 1.8; }
.wpi-assurance { display: flex; align-items: center; gap: 8px; color: var(--wpi-accent); font-size: 12px; margin-top: 4px !important; }
.wpi-assurance svg { width: 16px; height: 16px; }
.wpi-content { padding: 40px 44px 30px; min-width: 0; }
.wpi-intro { padding-right: 16px; margin-bottom: 28px; }
.wpi-intro .wpi-eyebrow { color: #77603e; font-size: 10px; letter-spacing: .14em; }
.wpi-intro h3 { font-size: clamp(23px, 2.4vw, 29px); line-height: 1.2; font-weight: 700; letter-spacing: -.045em; margin-top: 9px; }
.wpi-intro > p:last-child { max-width: 400px; font-size: 13px; line-height: 1.7; color: #69757d; margin-top: 12px; }
.wpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.wpi-wide { grid-column: 1 / -1; }
.wpi-section { margin-top: 24px !important; }
.wpi-section > legend, .wpi-extras > h3, .wpi-section-label { display: block; font-size: 14px; font-weight: 700; letter-spacing: -.015em; line-height: 1.5; }
.wpi-section > legend { margin-bottom: 14px; }
.wpi-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.wpi-field > label { font-size: 13px; font-weight: 600; }
.wpi-field > .wpi-section-label { font-size: 14px; font-weight: 700; }
.wpi-required { color: #896b40; }
.wpi-optional { font-size: 12px; font-weight: 400; color: #69757d; }
.wpi-field input, .wpi-field textarea { width: 100%; padding: 12px 14px; min-height: 46px; border: 1px solid var(--wpi-line); border-radius: 5px; background: #fcfcfc; color: var(--wpi-ink); font-size: 14px; line-height: 1.55; transition: border-color .18s, box-shadow .18s, background-color .18s; }
.wpi-field textarea { resize: vertical; min-height: 100px; }
.wpi-field :is(input, textarea)::placeholder { color: #68757e; opacity: 1; font-size: 13px; }
.wpi-field :is(input, textarea):hover { border-color: #aeb5ba; }
.wpi-field :is(input, textarea):focus { border-color: var(--wpi-accent); background: white; box-shadow: 0 0 0 3px #c39f6e1f; outline: none; }
.wpi-form :focus-visible, .wpi-dialog-close:focus-visible { outline: 2px solid #896b40; outline-offset: 4px; }
.wpi-form [aria-invalid="true"] { border-color: #b33c30; }
.wpi-form :is(input, textarea)[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #b33c301a; }
.wpi-contact-hint, .wpi-section-hint { font-size: 12px; color: #69757d; }
.wpi-contact-hint { margin-top: 8px !important; }
.wpi-section-hint { margin: 4px 0 14px !important; }
.wpi-extra > legend { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.wpi-extra > legend svg { width: 19px; height: 19px; color: #967543; }
.wpi-extra > legend .wpi-required { margin-left: -4px; }
.wpi-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wpi-choice { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--wpi-line); border-radius: 5px; color: #65717a; background: white; cursor: pointer; font-size: 13px; transition: color .18s, background-color .18s, border-color .18s; }
.wpi-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.wpi-choice svg { width: 13px; height: 13px; display: none; }
.wpi-choice:hover { border-color: var(--wpi-accent); color: var(--wpi-ink); }
.wpi-choice:has(input:checked) { border-color: var(--wpi-accent); color: var(--wpi-ink); background: #c39f6e1c; font-weight: 600; }
.wpi-choice:has(input:checked) svg { display: block; }
.wpi-choice:has(input:focus-visible) { outline: 2px solid var(--wpi-ink); outline-offset: 3px; }
.wpi-upload { position: relative; border: 1px dashed #c8ccce; border-radius: 6px; padding: 16px; background: #fafafa; transition: border-color .18s, background-color .18s; }
.wpi-upload:hover, .wpi-upload:focus-within { border-color: var(--wpi-accent); background: #fcfaf7; }
.wpi-upload-target { display: flex; align-items: center; gap: 12px; cursor: pointer; min-width: 0; }
.wpi-upload-icon { width: 24px; height: 24px; color: #8d7047; }
.wpi-upload-copy { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.wpi-upload-copy strong { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.wpi-upload-copy small { font-size: 12px; color: #65717a; }
.wpi-upload-action { display: none; border-bottom: 1px solid #a58453; padding-bottom: 1px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.wpi-upload input[type="file"] { font-size: 12px; max-width: 100%; margin-top: 12px; }
.wpi-upload input[type="file"]::file-selector-button { padding: 8px 12px; margin-right: 12px; border: 1px solid #c8ccce; background: white; border-radius: 4px; font: inherit; cursor: pointer; }
.wpi-upload[data-enhanced] .wpi-upload-action { display: block; }
.wpi-upload[data-enhanced] input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; margin: 0; }
.wpi-upload[data-enhanced]:has(input:focus-visible) { outline: 2px solid var(--wpi-accent); outline-offset: 3px; }
.wpi-upload[data-has-file] { border-style: solid; border-color: var(--wpi-accent); background: #fcfaf7; }
.wpi-upload-clear { background: none; border: 0; padding: 6px 0 0 36px; color: #685235; text-decoration: underline; text-underline-offset: 3px; font-size: 12px !important; cursor: pointer; }
.wpi-form [hidden] { display: none !important; }
.wpi-form-footer { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e9ebec; }
.wpi-privacy { display: flex; align-items: flex-start; gap: 9px; color: #606f78; font-size: 12px; line-height: 1.7; }
.wpi-privacy svg { width: 15px; height: 15px; margin-top: 2px; }
.wpi-privacy a { color: #4d5d66; text-decoration: underline; text-underline-offset: 2px; }
.wpi-submit { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 50px; margin-top: 18px; padding: 13px 20px; border: 1px solid var(--wpi-accent); border-radius: 5px; background: var(--wpi-accent); color: var(--wpi-ink); font-size: 14px !important; font-weight: 700 !important; cursor: pointer; transition: background-color .18s, border-color .18s, transform .18s; }
.wpi-submit svg { width: 21px; height: 21px; transition: transform .18s; }
.wpi-submit:hover:not(:disabled) { background: #d0af83; border-color: #d0af83; }
.wpi-submit:hover:not(:disabled) svg { transform: translateX(3px); }
.wpi-submit:active:not(:disabled) { transform: translateY(1px); }
.wpi-submit:disabled { opacity: .7; cursor: progress; }
.wpi-hint { color: #66737b; text-align: center; font-size: 12px; margin-top: 10px !important; }
.wpi-errors { padding: 16px; margin-bottom: 20px; background: #fcf3f1; border-left: 3px solid #b33c30; border-radius: 0 5px 5px 0; font-size: 13px; }
.wpi-errors:focus { outline: none; }
.wpi-errors h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.wpi-errors ul { list-style: disc; padding-left: 18px; margin: 8px 0; }
.wpi-error { color: #ab3128; display: block; font-size: 12px; line-height: 1.5; }
.wpi-success { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 400px; padding-block: 36px; }
.wpi-success-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #c39f6e24; color: #856532; margin-bottom: 28px; }
.wpi-success-icon svg { width: 32px; height: 32px; }
.wpi-success > .wpi-eyebrow { color: #856532; }
.wpi-success h2 { font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -.04em; margin: 12px 0; }
.wpi-success > p:last-of-type { color: #69757d; font-size: 14px; }
.wpi-return { display: inline-flex; gap: 24px; margin-top: 28px; color: var(--wpi-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }
.wpi-trap, .wpi-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wpi-page { font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); background: #edf0f1; margin: 0; }
.wpi-page-main { max-width: 1128px; margin: 40px auto; padding: 0 24px; }
.wpi-back { display: inline-block; font-size: 13px; margin-bottom: 24px; color: #53616a; text-decoration: underline; text-underline-offset: 4px; }
.wpi-page-main > h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* The surrounding dialog stays still; only its form column scrolls on desktop. */
.wpi-dialog { width: min(1080px, calc(100vw - 64px)); height: min(900px, calc(100dvh - 64px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 14px; background: white; color: #071219; box-shadow: 0 30px 100px #0005; overflow: hidden; }
.wpi-dialog::backdrop { background: #071219b8; backdrop-filter: blur(5px); }
.wpi-dialog-shell, .wpi-dialog-content, .wpi-dialog .wpi-form, .wpi-dialog .wpi-layout { height: 100%; }
.wpi-dialog-shell { position: relative; }
.wpi-dialog .wpi-form { max-width: none; }
.wpi-dialog .wpi-content, .wpi-dialog .wpi-context { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c3c7c9 transparent; }
.wpi-dialog .wpi-content { scrollbar-gutter: stable; padding-right: 84px; }
.wpi-dialog-close { position: absolute; z-index: 2; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; padding: 12px; border: 1px solid #e7e9e9; border-radius: 50%; background: white; color: #53616a; cursor: pointer; transition: background-color .18s, color .18s; }
.wpi-dialog-close svg { width: 20px; height: 20px; }
.wpi-dialog-close:hover { background: #f1f2f2; color: #071219; }
html:has(.wpi-dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: no-preference) {
  .wpi-dialog[open] { animation: wpi-open .22s ease-out; }
  @keyframes wpi-open { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
}
@media (max-width: 900px) {
  .wpi-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .wpi-content { padding-inline: 28px; }
  .wpi-dialog .wpi-content { padding-right: 72px; }
  .wpi-context { padding: 36px 24px 24px; }
  .wpi-context-title { font-size: 24px; }
  .wpi-upload-action { display: none !important; }
}
@media (max-width: 740px) {
  .wpi-layout { grid-template-columns: minmax(0, 1fr); }
  .wpi-context { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px 24px; padding: 28px 24px; align-items: center; }
  .wpi-context-heading { grid-column: 1; }
  .wpi-context h2 { font-size: 26px; }
  .wpi-context-image { grid-column: 2; grid-row: 1 / 3; }
  .wpi-photo { aspect-ratio: 1.25; }
  .wpi-context-description { display: none; }
  .wpi-assurance { grid-column: 1; font-size: 12px; }
  .wpi-content, .wpi-dialog .wpi-content { padding: 28px 24px; }
  .wpi-intro { margin-bottom: 24px; }
  .wpi-intro h3 { font-size: 25px; }
  .wpi-intro > p:last-child br { display: none; }
  .wpi-dialog { width: calc(100vw - 32px); height: calc(100dvh - 32px); }
  .wpi-dialog-content { overflow-y: auto; overscroll-behavior: contain; }
  .wpi-dialog .wpi-form, .wpi-dialog .wpi-layout { height: auto; min-height: 100%; }
  .wpi-dialog .wpi-content, .wpi-dialog .wpi-context { overflow: visible; }
  .wpi-dialog .wpi-context { padding-right: 62px; }
  .wpi-dialog-close { top: 12px; right: 12px; color: white; background: #071219; border-color: #ffffff40; }
  .wpi-dialog-close:hover { color: white; background: #ffffff26; }
  .wpi-success { min-height: 320px; }
}
@media (max-width: 480px) {
  .wpi-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .wpi-dialog .wpi-layout { border-radius: 0; }
  html:has(.wpi-dialog[open]) { scrollbar-gutter: auto; }
  .wpi-dialog-content { scrollbar-width: thin; }
  .wpi-context { grid-template-columns: minmax(0, 1fr) 96px; gap: 12px 16px; padding: 24px 20px; }
  .wpi-dialog .wpi-context { padding-right: 56px; }
  .wpi-context h2 { font-size: 25px; }
  .wpi-context-image { align-self: center; }
  .wpi-assurance { font-size: 11px; gap: 6px; }
  .wpi-content, .wpi-dialog .wpi-content { padding: 26px 20px; }
  .wpi-intro h3 { font-size: 24px; }
  .wpi-grid { gap: 14px 12px; }
  .wpi-section { margin-top: 24px !important; }
  .wpi-field :is(input, textarea) { font-size: 16px; }
  .wpi-field :is(input, textarea)::placeholder { font-size: 14px; }
  .wpi-contact-grid { grid-template-columns: minmax(0, 1fr); }
  .wpi-upload { padding: 14px; }
  .wpi-submit { min-height: 52px; }
  .wpi-page-main { padding: 0; margin: 0; }
  .wpi-page-main > .wpi-back { margin: 16px 20px; }
  .wpi-page .wpi-layout { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wpi-form *, .wpi-dialog-close { transition: none !important; animation: none !important; }
}
