/* ===== Book a demo / Sign up shared layout ===== */
  .form-page {
    background: var(--anthracite-100);
    color: #fff;
    padding: 96px 0 140px;
    position: relative;
    overflow: hidden;
  }
  .form-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse at 10% 20%, rgba(97,206,112,0.08), transparent 55%),
      radial-gradient(ellipse at 90% 80%, rgba(97,206,112,0.05), transparent 55%);
    pointer-events: none;
  }
  .form-page::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    pointer-events: none;
  }
  .form-hero {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 56px;
    position: relative;
    z-index: 2;
  }
  .form-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green-100);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 20px;
  }
  .form-hero .eyebrow .dot { width: 6px; height: 6px; background: var(--green-100); border-radius: 50%; }
  .form-hero h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 56px;
    letter-spacing: -0.025em;
    line-height: 1.05;
    color: #fff;
  }
  .form-hero .rule {
    width: 56px;
    height: 3px;
    background: var(--green-100);
    border-radius: 2px;
    margin: 24px auto 28px;
  }
  .form-hero p {
    font-size: 18px;
    line-height: 1.55;
    color: rgba(255,255,255,0.75);
    max-width: 640px;
    margin: 0 auto;
  }

  /* Two-column split card */
  .form-split {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    color: var(--color-text);
    border-radius: 24px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.25);
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    overflow: hidden;
  }
  /* Both panels are grid items — let them shrink past their content's
   * natural min-content width. Without this, descendant elements that
   * have an intrinsic min-width (e.g. CF7 inputs with size="40", or
   * any flex/grid child without its own min-width:0) push the panel
   * wider than its column, and the whole card overflows the viewport
   * on phone widths. */
  .form-split > .form-left,
  .form-split > .form-right { min-width: 0; }
  .form-left {
    padding: 48px 44px;
    background: linear-gradient(180deg, var(--off-white-40) 0%, var(--off-white-60) 100%);
    border-right: 1px solid var(--color-border);
  }
  .form-left h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin-bottom: 8px;
  }
  .form-left .lead {
    font-size: 16px;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin-bottom: 32px;
  }
  .gain-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
  }
  .gain-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 18px;
    align-items: start;
  }
  .gain-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--anthracite-100);
  }
  .gain-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
  .gain-item strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--color-text);
  }
  .gain-item p {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 0;
  }

  /* Trust bar */
  .trust-bar {
    margin-top: auto;
    padding-top: 28px;
    border-top: 1px solid var(--color-border);
  }
  .trust-bar-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    margin-bottom: 14px;
  }
  .trust-logos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: center;
  }
  .trust-logo {
    height: 36px;
    border-radius: 6px;
    background: var(--off-white-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    text-align: center;
    padding: 4px 10px;
  }
  .trust-logo .customer-logo { max-height: 24px; max-width: 100%; }

  /* Form side */
  .form-right {
    padding: 48px 44px;
    background: #fff;
  }
  .form-right h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin-bottom: 4px;
  }
  .form-right .sub {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 28px;
  }
  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .form-grid .full { grid-column: 1 / -1; }
  .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .field label {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0;
  }
  .field .req { color: var(--color-danger); margin-right: 2px; }
  .field input, .field select, .field textarea {
    font-family: var(--font-ui);
    font-size: 16px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard);
  }
  .field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--anthracite-100);
    box-shadow: 0 0 0 3px rgba(27,32,38,0.08);
  }
  .field textarea { resize: vertical; min-height: 90px; }
  .field .help {
    font-size: 11px;
    color: var(--color-text-subtle);
  }
  .consent {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 10px;
    align-items: start;
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-top: 4px;
  }
  .consent input { margin-top: 2px; }
  .consent a { color: var(--anthracite-100); text-decoration: underline; }
  .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
  }
  .form-actions .btn {
    min-width: 200px;
    justify-content: center;
  }
  .form-note {
    font-size: 12px;
    color: var(--color-text-subtle);
    text-align: center;
    margin-top: 16px;
  }

  /* ===== Signup form — production markup uses .signup-form / .form-row ===== */
  #signup-form { display: flex; flex-direction: column; gap: 18px; }

  /* Error banner shown when /signup/?error=… is in the URL after a
   * failed submission (captcha / duplicate email / validation, etc.). */
  #signup-form .signup-error {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px;
    background: #FBEBE8;
    border: 1px solid #F0C7C2;
    border-radius: 10px;
    color: #8A1A0F;
    font-size: 14px;
    line-height: 1.4;
  }
  #signup-form .signup-error svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

  /* Invisible reCAPTCHA holder — the badge renders 'inline' so it sits
   * inside the form rather than as a floating fixed-position badge.
   * The Google-mandated reCAPTCHA attribution lives in footer.php
   * (covers every form on every page), so the badge can be hidden
   * via the global .grecaptcha-badge rule in this stylesheet's
   * peers — but we still let it render here so reCAPTCHA's
   * own measurement passes. */
  #signup-form .inv-recaptcha-holder { min-height: 0; }
  #signup-form .inv-recaptcha-holder .grecaptcha-badge { visibility: hidden !important; }
  #signup-form .signup-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  #signup-form .form-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  #signup-form .form-row.full { grid-column: 1 / -1; }
  @media (max-width: 560px) {
    #signup-form .signup-form { grid-template-columns: 1fr; }
  }
  #signup-form .form-row label {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
  }
  #signup-form .form-row label .required { color: var(--color-danger); margin-right: 2px; }
  #signup-form .form-row label small { font-weight: 500; color: var(--color-text-subtle); }
  #signup-form .form-row label small a { color: var(--anthracite-100); text-decoration: underline; }
  #signup-form .form-row input[type="text"],
  #signup-form .form-row input[type="email"],
  #signup-form .form-row input[type="tel"],
  #signup-form .form-row select {
    font-family: var(--font-ui);
    font-size: 16px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    width: 100%;
    box-sizing: border-box;
    transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard);
  }
  #signup-form .form-row input:focus,
  #signup-form .form-row select:focus {
    outline: none;
    border-color: var(--anthracite-100);
    box-shadow: 0 0 0 3px rgba(27,32,38,0.08);
  }
  /* Consent row — inline checkbox + label on a single baseline. */
  #signup-form .form-row.consent {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
  }
  #signup-form .form-row.consent input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
  #signup-form .form-row.consent label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    line-height: 1.5;
  }
  #signup-form .form-row.consent label a {
    color: var(--anthracite-100);
    text-decoration: underline;
  }
  #signup-form #register-submit {
    margin-top: 6px;
    align-self: stretch;
    width: 100%;
    justify-content: center;
    padding: 16px 22px;
  }
  #signup-form .form-note { margin-top: 4px; }

  /* ===== Contact Form 7 overrides (Book Web Demo) ===== */
  .pi-cf7-wrap .wpcf7 { margin: 0; padding: 0; }
  .pi-cf7-wrap .wpcf7-form { display: flex; flex-direction: column; gap: 18px; }

  /* CF7 forms: let grid + flex children shrink below their content's
   * min-content size. CF7 inputs ship with size="40" giving them a
   * natural intrinsic width around 280px — without min-width:0 the
   * paired-field grid (.field.row, 1fr 1fr) refuses to shrink narrower
   * than that and the whole form column overflows the viewport on
   * phones. Same fix #signup-form .form-row uses (min-width: 0). */
  .pi-cf7-wrap .wpcf7-form,
  .pi-cf7-wrap .wpcf7-form > .field,
  .pi-cf7-wrap .field.row,
  .pi-cf7-wrap .field.row > .field,
  .pi-cf7-wrap .wpcf7-form-control-wrap {
    min-width: 0;
  }
  .pi-cf7-wrap .wpcf7-form > p,
  .pi-cf7-wrap .field > br,
  .pi-cf7-wrap .consent > br,
  .pi-cf7-wrap .form-actions > br,
  .pi-cf7-wrap .form-note > br { display: none; }
  .pi-cf7-wrap .screen-reader-response,
  .pi-cf7-wrap .hidden-fields-container { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
  .pi-cf7-wrap .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .pi-cf7-wrap .wpcf7-text,
  .pi-cf7-wrap .wpcf7-email,
  .pi-cf7-wrap .wpcf7-tel,
  .pi-cf7-wrap .wpcf7-select,
  .pi-cf7-wrap .wpcf7-textarea,
  .pi-cf7-wrap .wpcf7-number,
  .pi-cf7-wrap .wpcf7-date {
    font-family: var(--font-ui);
    font-size: 16px;
    padding: 12px 14px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard);
  }
  .pi-cf7-wrap .wpcf7-text:focus,
  .pi-cf7-wrap .wpcf7-email:focus,
  .pi-cf7-wrap .wpcf7-tel:focus,
  .pi-cf7-wrap .wpcf7-select:focus,
  .pi-cf7-wrap .wpcf7-textarea:focus,
  .pi-cf7-wrap .wpcf7-number:focus,
  .pi-cf7-wrap .wpcf7-date:focus {
    outline: none;
    border-color: var(--anthracite-100);
    box-shadow: 0 0 0 3px rgba(27,32,38,0.08);
  }
  .pi-cf7-wrap .wpcf7-textarea { resize: vertical; min-height: 90px; }

  /* Selects: force consistent rendering across mobile browsers.
   * Without `appearance: none` Android Chrome / iOS Safari can size
   * the visible select control oddly when it sits inside CF7's inline
   * <span class="wpcf7-form-control-wrap"> wrapper, which in turn
   * causes the OS-rendered dropdown popup to anchor at the span's
   * bounding box rather than the select's — surfacing as a small
   * mis-positioned popup at the top-left of the form. Stripping
   * native chrome + supplying a custom chevron pins the box dimensions
   * deterministically and the popup anchors to the actual visible
   * select. Same fix .ct-form select uses on /contact/. */
  .pi-cf7-wrap .wpcf7-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6877' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
  }
  /* Mac/iOS Safari ignores `appearance: none` on selects unless the
   * select also has explicit dimensions — declare a min-height so the
   * pickerthat opens has a real anchor box to attach to. */
  .pi-cf7-wrap .wpcf7-select { min-height: 48px; }

  /* Acceptance (consent) checkbox */
  .pi-cf7-wrap .consent .wpcf7-form-control-wrap { display: block; }
  .pi-cf7-wrap .wpcf7-acceptance {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    width: auto;
  }
  .pi-cf7-wrap .wpcf7-acceptance .wpcf7-list-item { display: block; margin: 0; }
  .pi-cf7-wrap .wpcf7-acceptance label {
    display: flex;
    /* flex-start aligns the checkbox to the first line of the wrapped
     * label text instead of the vertical centre of a possibly two-line
     * block (which would leave it floating mid-paragraph). */
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
    cursor: pointer;
    /* Was nowrap — that forced the consent text onto a single ~580px
     * line, blowing past the form column on phones, expanding the
     * document scroll-width and triggering iOS Safari's auto-zoom-out
     * (which in turn made native select popups render at displaced
     * positions / smaller text). */
  }
  .pi-cf7-wrap .wpcf7-acceptance input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    /* Nudge the checkbox down so it visually centres on the cap-height
     * of the first line of label text rather than sitting at the very
     * top of the line-box. */
    margin: 2px 0 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    box-shadow: none;
  }
  .pi-cf7-wrap .wpcf7-list-item-label {
    /* Allow the label to fill the remaining flex column AND shrink past
     * its content's min-content size (long words get broken if needed,
     * normal whitespace wraps naturally). */
    flex: 1;
    min-width: 0;
  }
  .pi-cf7-wrap .wpcf7-list-item-label a { color: var(--anthracite-100); text-decoration: underline; }

  .pi-cf7-wrap .form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
  }
  .pi-cf7-wrap .form-actions .wpcf7-submit { cursor: pointer; min-width: 200px; order: 3; }
  .pi-cf7-wrap .form-actions .wpcf7-spinner { order: 2; margin: 0; }
  .pi-cf7-wrap .form-actions .wpcf7-response-output {
    order: 1;
    margin: 0 auto 0 0;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.35;
    flex: 0 1 auto;
  }
  .pi-cf7-wrap .form-actions .wpcf7-response-output:empty { display: none; }

  /* /demo/ form: 2-column paired-field rows. The CF7 form template uses
   * <div class="field row"> as the paired-field wrapper. Without this
   * rule the outer .field's flex-column stacks them vertically; same
   * pattern contact.css and roi-calculator.css apply within their own
   * scopes. Stacks back to a single column under 560px to match the
   * signup form's mobile breakpoint. */
  #demoForm .field.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  #demoForm .field.row > .field { margin-bottom: 0; }
  @media (max-width: 560px) {
    #demoForm .field.row { grid-template-columns: 1fr; }
  }

  /* /demo/ form: full-width submit + centred form-note underneath. The
   * submit-row is a plain block container (no flex/grid in this scope)
   * so width: 100% on the input is enough to span the form. display:flex
   * keeps the .btn's icon+text alignment consistent with everywhere else
   * the .btn class is used. */
  #demoForm .submit-row .wpcf7-submit {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  /* CF7 response / validation messages */
  .pi-cf7-wrap .wpcf7-response-output {
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid var(--color-border);
  }
  .pi-cf7-wrap .wpcf7-not-valid-tip {
    color: var(--color-danger);
    font-size: 12px;
    margin-top: 4px;
    display: block;
  }
  .pi-cf7-wrap .wpcf7-form.invalid .wpcf7-response-output,
  .pi-cf7-wrap .wpcf7-form.unaccepted .wpcf7-response-output { border-color: var(--color-danger); color: var(--color-danger); }
  .pi-cf7-wrap .wpcf7-form.sent .wpcf7-response-output { border-color: var(--green-100); color: var(--green-100); }

  /* Social proof section below form */
  .proof-rail {
    padding: 96px 0;
    background: var(--off-white-40);
    border-top: 1px solid var(--color-border);
  }
  .proof-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
  }
  .proof-head h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 32px;
    letter-spacing: -0.02em;
    line-height: 1.15;
  }
  .proof-rail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .proof-stat {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 32px;
    text-align: left;
  }
  .proof-stat .n {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 44px;
    letter-spacing: -0.02em;
    color: var(--anthracite-100);
    line-height: 1;
  }
  .proof-stat .l {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 8px;
  }
  .proof-stat .q {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    font-style: italic;
  }
  .proof-stat .who {
    font-size: 12px;
    color: var(--color-text-subtle);
    margin-top: 10px;
    font-style: normal;
  }

  @media (max-width: 900px) {
    .form-split { grid-template-columns: 1fr; }
    .form-left { border-right: none; border-bottom: 1px solid var(--color-border); }
    .form-hero h1 { font-size: 40px; }
    .form-grid { grid-template-columns: 1fr; }
    .proof-rail-grid { grid-template-columns: 1fr; }
    /* Tighten + even out the panel padding once we're stacked. The
     * desktop 48px/44px asymmetry was tuned for the side-by-side
     * layout (a touch less side padding so the gradient + form felt
     * balanced); once stacked it just eats space the form actually
     * needs on phones. 28px all round gives consistent breathing room
     * across both panels on demo + signup. */
    .form-left,
    .form-right { padding: 28px; }
  }
  @media (max-width: 480px) {
    /* Very narrow phones — squeeze further so the form fields get the
     * maximum usable column width without crowding the edges. */
    .form-left,
    .form-right { padding: 24px 20px; }
  }

.check-icon { background: var(--green-20) !important; color: #1E7A2B !important; }
