:root {
  /* AI lane highlight: muted grey/yellow used for drafting + AI/API-derived fields */
  --rap-derived-ai-bg: #f3f1e7;
}

.rap-ctv-autofill-hint {
  display: none;
  margin-left: 8px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.2;
  vertical-align: middle;
}

.rap-legal-inline-seg-row:hover .rap-ctv-autofill-hint:not([hidden]),
.rap-legal-inline-seg-row:focus-within .rap-ctv-autofill-hint:not([hidden]) {
  display: none !important;
}

/* Land Registry PPD under Core facts price. LDS hides the wrap in PHP/JS; leave these styles for a future re-enable. */
.rap-ppd-price-hint {
  margin: 0.35rem 0 0;
  padding: 0;
  max-width: 36rem;
  font-size: 12px;
  line-height: 1.35;
  color: #6b7280;
}

.rap-ppd-price-history__list {
  margin: 0.2rem 0 0;
  padding: 0 0 0 1rem;
  max-width: 36rem;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

.rap-ppd-price-history__list li {
  margin: 0 0 0.08rem;
}
/* Two-screen flow */
.rap-form-flow {
    margin-top: 0.15rem;
}

/* Modal: override theme (style.css) padding, max-height, form margins — logo left to theme */
#register-form-overlay.custom-form-overlay,
#modify-form-overlay.custom-form-overlay {
    width: 40% !important;
    min-width: 700px !important;
    max-width: calc(100vw - 24px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: min(88vh, 860px) !important;
    padding: 0.35rem 0.75rem 0.2rem !important;
    box-sizing: border-box !important;
}

/* ── Pricing corner triangle: outer register overlay clips triangle to border-radius ── */
#register-form-overlay.custom-form-overlay {
    overflow: hidden !important;
    padding: 0 !important;
    /* Remove border so the red triangle bleeds flush to the overlay edge.
       Box-shadow (inherited from theme) provides the modal definition. */
    border: none !important;
}

/* Inner scroll wrapper carries the padding the outer had, and handles scrolling */
#register-form-overlay .rap-form-inner {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: min(88vh, 860px);
    padding: 0.35rem calc(0.75rem + 5px) 0.2rem;
    box-sizing: border-box;
    height: auto;
}

/* Screen 1 compact: inner grows freely (matches former overflow:visible on outer) */
#register-form-overlay.rap-screen1-compact .rap-form-inner {
    overflow: visible;
    max-height: none;
    height: auto;
    padding: 14px 20px 8px;
    background: #fff;
}
#modify-form-overlay.rap-screen1-compact .rap-form-inner {
    overflow: visible;
    max-height: none;
    height: auto;
    padding: 14px 20px 8px;
    background: #fff;
}

/* Hide pricing corner on Screen 2 — the overlay loses rap-screen1-compact when Screen 2 is active */
#register-form-overlay:not(.rap-screen1-compact) .rap-price-corner {
    display: none !important;
}

/* ── Pricing corner triangle ──
   .rap-price-corner is the positioned wrapper.
   .rap-price-ribbon is the red triangle; position:relative contains its text.
*/
.rap-price-corner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10003;
    pointer-events: none;   /* only the ribbon catches mouse events */
    overflow: visible;
}
.rap-price-ribbon {
    position: relative;    /* contain __text absolutely-positioned children */
    display: block;
    width: 112px;
    height: 112px;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    background: #eb0c0c;   /* same red as the site header background; solid (not translucent) */
    text-decoration: none;
    pointer-events: auto;
}
.rap-price-ribbon:hover,
.rap-price-ribbon:focus {
    background: #cf0a0a;   /* slightly darker on hover, still solid */
}

.rap-price-ribbon__text {
    position: absolute;
    /*
     * Triangle centroid sits at (112/3 ≈ 37, 37). Text nudged towards the top-left
     * corner so the triangle can be smaller.
     * Text box: 82px wide; centre = (left + 41, top + ~20) → top: 14px; left: -6px.
     */
    top: 14px;
    left: -6px;
    width: 82px;
    color: #fff;
    text-align: center;
    transform: rotate(-45deg);
    transform-origin: center center;
}
.rap-price-ribbon__from {
    display: block;
    font-size: 13px;
    font-weight: 400;
    line-height: 0.7;
    letter-spacing: 0.03em;
    margin-bottom: 1px;
    margin-left: -10px;
}
.rap-price-ribbon__price-line {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    line-height: 1;
    margin-left: 12px;   /* nudge the £10 line further right (the + VAT sits lower in the triangle) */
}
.rap-price-ribbon__price {
    display: inline-flex;
    align-items: center;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
}
.rap-price-ribbon__currency {
    font-size: 36px;
    font-weight: 800;
    margin-left: -6px;
    margin-right: 1.5px;
    line-height: 1;
}
.rap-price-ribbon__vat {
    font-size: 11px;
    font-weight: 400;
    margin-left: 3px;
    align-self: flex-end;
    padding-bottom: 3px;
    white-space: nowrap;   /* keep "+ VAT" on one line — never split + from VAT */
}

/* Screen 1 (Register): match search modal panel (solid white, radius, shadow, padding) */
#register-form-overlay.custom-form-overlay.rap-screen1-compact {
    width: min(520px, calc(100vw - 24px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
    background: #fff !important;
    border-radius: 10px !important;
    border: none !important;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.28),
        0 16px 40px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.06) !important;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.22));
}
#modify-form-overlay.custom-form-overlay.rap-screen1-compact {
    width: min(520px, calc(100vw - 24px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
    padding: 0 !important;
    background: #fff !important;
    border-radius: 10px !important;
    border: none !important;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.28),
        0 16px 40px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.06) !important;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.22));
}

/* Screen 1: grow the modal with the narrative + controls — avoid inner scrollbar (theme + JS used to cap height) */
#register-form-overlay.custom-form-overlay.rap-screen1-compact,
#modify-form-overlay.custom-form-overlay.rap-screen1-compact {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

/* Register: keep outer overflow:hidden on Screen 1 so ribbon stays clipped to border-radius */
#register-form-overlay.custom-form-overlay.rap-screen1-compact {
    overflow: hidden !important;
}

/* Register screen 2: solid white panel + shadow (match screen 1) */
#register-form-overlay.custom-form-overlay:not(.rap-screen1-compact) {
    background: #fff !important;
    border: none !important;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.28),
        0 16px 40px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.06) !important;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.22));
}

/* Modify screen 2 (after email gate): solid white panel + shadow */
#modify-form-overlay.custom-form-overlay:not(.rap-modify-gate-active) {
    background: #fff !important;
    border: none !important;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.28),
        0 16px 40px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.06) !important;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.22));
}

/* Hide email-gate chrome once the main modify form is showing */
#modify-form-overlay:not(.rap-modify-gate-active) .rap-modify-gate__head,
#modify-form-overlay:not(.rap-modify-gate-active) .rap-modify-gate__title,
#modify-form-overlay:not(.rap-modify-gate-active) .rap-modify-gate__subline,
#modify-form-overlay:not(.rap-modify-gate-active) .rap-modify-gate__step,
#modify-form-overlay:not(.rap-modify-gate-active) .rap-modify-gate__msg {
    display: none !important;
}

/* Extra interior space (approx +5px left/right) — register uses rap-form-inner for padding */
#modify-form-overlay.custom-form-overlay {
    padding-left: calc(0.75rem + 5px) !important;
    padding-right: calc(0.75rem + 5px) !important;
}

/* Wider modal container (fallback) */
.custom-form-overlay {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    min-width: 700px;
    max-width: calc(100vw - 24px);
    height: auto;
    max-height: 88vh;
    overflow: auto;
    box-sizing: border-box;
    padding: 0.55rem 0.9rem 0.15rem;
}

/* Extra interior space (approx +5px left/right) */
.custom-form-overlay {
    padding-left: calc(0.9rem + 5px);
    padding-right: calc(0.9rem + 5px);
}

.custom-form-overlay input[type="email"],
.custom-form-overlay input[type="url"],
.custom-form-overlay input[type="text"],
.custom-form-overlay input[type="file"],
.custom-form-overlay textarea {
    margin-bottom: 0;
}

#register-form-overlay .form-header,
#modify-form-overlay .form-header {
    padding-top: 0.25rem !important;
    margin-bottom: 0.25rem !important;
}

#register-form-overlay #register-form,
#modify-form-overlay #modify-form {
    margin-top: 0.35rem !important;
}

#register-form-overlay #rap_narrative,
#modify-form-overlay #rap_narrative {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    max-width: 100%;
    font-size: 1.125rem !important; /* 18px — legible body */
    line-height: 1.55 !important;
    color: #333 !important;
    /* Theme sets textarea padding-left: 0 — keep comfortable inset for placeholder + input */
    padding: 0.85rem 1rem calc(1.2rem - 5px) !important;
    /* Theme .custom-form-overlay textarea { border: none } — restore visible frame */
    border: 1px solid #333 !important;
    border-radius: 6px !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
    overflow-y: hidden !important;
}
#register-form-overlay #rap_narrative::placeholder,
#modify-form-overlay #rap_narrative::placeholder {
    color: #aaa !important;
    opacity: 1 !important;
}

.rap-browser-safari #register-form-overlay #rap_narrative,
.rap-browser-safari #modify-form-overlay #rap_narrative {
    padding-bottom: calc((1.2rem - 5px) + 10px) !important;
}
.rap-screen {
    display: none;
}
.rap-screen.is-active {
    display: block;
}
.rap-screen--1 {
    max-width: 520px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0.5rem;
}
.rap-screen--2 {
    max-width: 100%;
}
.rap-screen-actions {
    margin-top: 0.75rem;
}
.rap-screen-actions--top {
    margin-top: 0;
    margin-bottom: 0.75rem;
}
/* Back control: align with review panel content */
.rap-ai-panel__header .rap-screen-actions--top {
    display: block;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 10px;
    padding-left: 0;
}
.rap-screen-next,
.rap-screen-back {
    appearance: none;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #333;
    border-radius: 6px;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    font-weight: 600;
}
/* Same asset as masonry .nav-previous (previous-page-arrow.svg) */
.rap-screen-back.rap-screen-back--masonry-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    margin: 0 0 0.35rem;
    line-height: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.rap-screen-back--masonry-arrow:hover {
    opacity: 0.72;
    background: transparent;
}
.rap-screen-back--masonry-arrow:focus-visible {
    outline: 2px solid #333;
    outline-offset: 3px;
}
/* Masonry previous-page arrow (same SVG as archive pagination) */
.rap-screen-back--masonry-arrow svg {
    width: 1.3rem;
    height: 1.3rem;
    display: block;
}
.rap-screen-back--masonry-arrow svg path {
    fill: #333 !important;
}
.rap-screen-back--masonry-arrow:hover svg path {
    fill: #333 !important;
}
.rap-screen-next {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Instruction line above form */
.rap-form-instruction {
    margin: 0.5rem 0 0;
    font-size: 1rem;
    color: #444;
    display: none;
}

#register-form-overlay .form-logo.register-logo,
#modify-form-overlay .form-logo.modify-logo {
    max-width: 35% !important;
}

/* Left: narrative box */
.rap-form-narrative-box {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}
.rap-form-register-logo-wrap {
    display: flex;
    justify-content: center;
    margin: 20px 0 0;
}
.rap-form-register-logo {
    width: 28px;
    height: 28px;
    display: block;
}
/* Form flow titles — Roboto Black; trailing dot on Register/Update brand lines only. */
.rap-form-flow-title,
.rap-form-register-title {
    margin: 0 auto 0.55rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #333333;
    font-family: "Roboto", "Source Sans Pro", sans-serif;
    text-align: center;
    line-height: 1;
    max-width: 100%;
}

/* Register screen 1: no gap below logo; top spacing from panel padding only */
#register-form-overlay.rap-screen1-compact .rap-form-register-logo-wrap {
    margin: 0;
}

#register-form-overlay.rap-screen1-compact .rap-form-flow-title--register {
    font-size: 2.15em;
    margin-top: 25px;
}

#register-form-overlay.rap-screen1-compact .rap-form-narrative-intro:not(.rap-form-narrative-intro--follow) {
    margin-top: 20px;
}

#modify-form-overlay.rap-screen1-compact .rap-form-flow-title--modify {
    font-size: 2.25rem;
    margin-top: 15px;
}

/* On narrow screens the title would sit under the "×", so reserve clearance there. */
@media (max-width: 460px) {
    #register-form-overlay.rap-screen1-compact .rap-form-flow-title--register {
        margin-top: 30px;
    }

    #modify-form-overlay.rap-screen1-compact .rap-form-flow-title--modify {
        margin-top: 30px;
    }
}

/* Register screen 1: field corners match search modal */
#register-form-overlay.rap-screen1-compact .rap-form-narrative-input {
    border-radius: 8px;
}
/* Register overlay: consistent 8px corners on compact-style controls (screen 1 + review) */
#register-form-overlay .rap-compact-upload {
    border-radius: 8px;
}
#register-form-overlay.rap-screen1-compact .rap-screen-next.rap-compact-review {
    border-radius: 8px;
}
#register-form-overlay .rap-form-actions .rap-review-cta-row .rap-save-draft-btn,
#register-form-overlay .rap-form-actions .rap-review-cta-row .submit-button {
    border-radius: 8px !important;
    min-height: 40px !important;
    height: 40px !important;
    max-height: 40px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    line-height: 1.2 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    box-sizing: border-box;
}
#register-form-overlay .rap-form-actions .rap-review-cta-row .rap-save-draft-btn {
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
}
#register-form-overlay .rap-form-actions .rap-review-cta-row .submit-button {
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
}
#register-form-overlay .rap-form-actions .rap-review-cta-row .rap-save-draft-btn:hover,
#register-form-overlay .rap-form-actions .rap-review-cta-row .rap-save-draft-btn:focus-visible {
    background: rgba(51, 51, 51, 0.06) !important;
    color: #333 !important;
    border-color: #333 !important;
}

/* ── Modify (Update property details) email gate — match estate agent account modal ── */
#modify-form-overlay.custom-form-overlay.rap-modify-gate-active {
    --rap-so-space: 8px;
    --rap-so-pad-x: 20px;
    --rap-so-pad-top: 14px;
    --rap-so-pad-bottom: 14px;
    /* Wide enough for “Update property details” on one line at ~2.4rem */
    width: min(520px, calc(100vw - 24px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
    border-radius: 10px !important;
    border: none !important;
    padding: var(--rap-so-pad-top) var(--rap-so-pad-x) var(--rap-so-pad-bottom) !important;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.28),
        0 16px 40px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.06) !important;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.22));
}
#modify-form-overlay.rap-modify-gate-active .rap-form-inner {
    padding: 0;
    background: transparent;
}

/* Shared close × — Register + Modify (all screens), same as search/account */
#register-form-overlay .close-form-button,
#modify-form-overlay .close-form-button,
#register-form-overlay .rap-form-close,
#modify-form-overlay .rap-form-close,
.rap-form-close.close-form-button {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: #333;
    background: #f5f5f5;
    border: 1px solid #e6e6e6;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10004;
}
#register-form-overlay .close-form-button:hover,
#modify-form-overlay .close-form-button:hover,
#register-form-overlay .rap-form-close:hover,
#modify-form-overlay .rap-form-close:hover,
.rap-form-close.close-form-button:hover {
    color: #555;
    background: #efefef;
    border-color: #ddd;
}

.rap-modify-gate__head {
    display: block;
    height: 0;
    margin: 0;
    padding: 0;
}
.rap-modify-gate__head-spacer {
    display: none;
}
.rap-modify-gate__head .rap-form-register-logo-wrap {
    grid-column: 2;
    justify-self: center;
    margin: 0;
}
#modify-form-overlay.rap-modify-gate-active .rap-modify-gate__title {
    margin: 6px 0 calc(var(--rap-so-space, 8px) * 2);
    padding: 0 42px; /* clear the absolute close × */
    box-sizing: border-box;
    max-width: 100%;
    font-family: "Roboto", "Source Sans Pro", sans-serif;
    font-size: 2.4rem; /* was 2.55rem — slightly smaller, one line */
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #333333;
    text-align: center;
    text-transform: none;
    white-space: nowrap !important;
}
@media (max-width: 480px) {
    #modify-form-overlay.rap-modify-gate-active .rap-modify-gate__title {
        font-size: 1.85rem;
        padding: 0 36px;
    }
}
.rap-modify-gate__subline {
    margin: 0 0 calc(var(--rap-so-space, 8px) * 2);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.5;
    color: #333;
    text-align: left;
}
.rap-modify-gate__step {
    display: block;
    margin: 0;
}
.rap-modify-gate__row {
    display: flex;
    align-items: stretch;
    gap: var(--rap-so-space, 8px);
    margin: 0;
}
.rap-modify-gate__input {
    flex: 1 1 auto;
    width: auto;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 16px !important;
    font-size: 1.125rem;
    line-height: 1.5;
    border: 1px solid #aaa !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
}
.rap-modify-gate__input:focus,
.rap-modify-gate__input:focus-visible {
    border-color: #777 !important;
    box-shadow: none !important;
    outline: none !important;
}
.rap-modify-gate__input::placeholder {
    color: #999;
    opacity: 1;
}
.rap-modify-gate__row .rap-modify-gate__submit {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}
.rap-modify-gate__submit {
    display: block;
    width: auto;
    margin: 0 auto;
    padding: 10px 24px;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px !important;
    box-sizing: border-box;
}
.rap-modify-gate__msg {
    margin: calc(var(--rap-so-space, 8px) * 2) 0 0;
    font-size: 0.95rem;
    color: #c00;
    text-align: left;
}
@media (max-width: 480px) {
    .rap-modify-gate__row {
        flex-direction: column;
    }
    .rap-modify-gate__row .rap-modify-gate__submit {
        width: 100%;
    }
}
.rap-form-narrative-title {
    margin: 0;
    font-size: 16pt;
    font-weight: 600;
    color: #333;
    text-align: left;
}
.rap-form-narrative-intro {
    margin: 0 0 0.65rem;
    font-size: 1.0625rem; /* 17px — readable helper copy */
    line-height: 1.5;
    color: #333;
    text-align: left;
}
.rap-form-narrative-intro--follow {
    margin-top: 0.35rem;
}
.rap-form-narrative-foot {
    margin: 0.5rem 0 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    text-align: left;
}
.rap-form-narrative-input {
    width: 100%;
    box-sizing: border-box;
    /* Inner spacing for placeholder + typed text (not margins on intro/foot) */
    padding: 0.85rem 1rem;
    font-size: 1.125rem;
    line-height: 1.55;
    color: #333;
    /* Border on #rap_narrative (theme clears textarea borders) */
    border-radius: 6px;
    background: #fff;
    resize: none;
    min-height: 52px;
    overflow-y: hidden;
}
.rap-form-narrative-input::placeholder {
    color: #aaa;
    opacity: 1;
}

/* Compact row under narrative */
.rap-compact-row {
    margin-top: 0;
    margin-bottom: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 10px; /* keep at least 10px between Add and Review when on same row */
    row-gap: 6px;
    width: 100%;
    box-sizing: border-box;
}

.rap-compact-upload-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    margin: 0;
    min-width: 0; /* allow grid column shrink; prevents Review button wrapping */
}

.rap-compact-upload-previews {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    min-height: 150px;
    margin-bottom: 0.25rem;
    gap: 10px;
    margin-left: 0;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    min-width: 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px; /* keep scrollbar from hiding bottom of thumbs */
}
.rap-compact-upload-previews:not(.is-empty) {
    margin-top: calc(0.65rem - 10px);
    margin-bottom: calc(0.65rem - 5px);
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.rap-compact-upload-previews.is-empty {
    display: none;
}

.rap-compact-preview-cell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 0 0 auto;
    width: 150px;
    min-width: 0;
}
.rap-compact-upload-previews .rap-compact-preview-thumb {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
/* Captions on screen 1: 2nd photo onward — spacing matches #rap_card_photos (margin-top 2px, padding 0.25rem 0) */
.rap-compact-caption-wrap {
    width: 100%;
    margin-top: 0;
    flex: 0 0 auto;
}
#register-form-overlay .rap-compact-caption-input,
#modify-form-overlay .rap-compact-caption-input {
    width: 100%;
    box-sizing: border-box;
    margin: 2px 0 0 !important;
    padding: 0.25rem 0 !important;
    font-size: 1rem !important;
    line-height: 1.35 !important;
    color: #333 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
}
#register-form-overlay .rap-compact-caption-input::placeholder,
#modify-form-overlay .rap-compact-caption-input::placeholder {
    color: #888;
    opacity: 1;
}

.rap-compact-preview-remove {
    position: absolute;
    left: auto;
    right: 6px;
    top: 4px;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(255,255,255,0.95) !important;
    color: #333;
    font-size: 14px;
    line-height: 14px;
    padding: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.rap-compact-preview-remove:hover {
    background: rgba(255,255,255,1) !important;
}

.rap-compact-preview-remove:focus-visible {
    outline: 2px solid rgba(0,0,0,0.15);
    outline-offset: 1px;
}

.rap-compact-placeholder-thumb {
    opacity: 0.18;
    filter: grayscale(1);
    border-color: transparent !important;
}

.rap-compact-pdf-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.rap-compact-pdf-icon {
    width: 66px;
    height: 66px;
    opacity: 0.7;
}

.rap-compact-pdf-label {
    max-width: 138px;
    font-size: 12px;
    font-weight: 700;
    color: #444;
    letter-spacing: 0;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.rap-compact-upload-previews .rap-compact-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rap-compact-upload-previews.is-overflowing {
    gap: 8px;
}

.rap-compact-upload-previews.is-overflowing .rap-compact-preview-thumb {
    margin-left: 0 !important;
}

.rap-compact-upload-previews.is-overflowing .rap-compact-preview-thumb:first-child {
    margin-left: 0 !important;
}

.rap-compact-upload-previews-wrap {
    flex: 0 0 100%;
    width: 100%;
    justify-self: stretch;
}

.rap-compact-doc-badge {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    letter-spacing: 0.2px;
    user-select: none;
}

/* Drag-and-drop highlight for the modal overlay */
#register-form-overlay.rap-dnd-active,
#modify-form-overlay.rap-dnd-active {
    outline: 2px dashed rgba(0,0,0,0.25);
    outline-offset: 6px;
}
.rap-compact-field {
    display: flex;
    align-items: center;
    border: none;
    border-radius: 0;
    background: transparent;
    min-height: 40px;
    overflow: hidden;
}
.rap-compact-field input,
.rap-compact-field select {
    width: 100%;
    border: 0;
    outline: none;
    padding: 0.45rem 0.65rem;
    font-size: 0.95rem;
    background: transparent;
    height: 40px;
    line-height: 40px;
    box-sizing: border-box;
}
.rap-compact-prefix {
    padding-left: 0.65rem;
    color: #555;
    font-weight: 600;
}
.rap-compact-field--price input {
    padding-left: 0.35rem;
}
/* Transparent + dotted #333 border; same height as Review (40px) on screen 1 + Photos (review) */
.rap-compact-upload {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 40px;
    height: 40px;
    border: 1px dotted #333 !important;
    border-style: dotted !important;
    outline: none;
    box-shadow: none;
    border-radius: 6px;
    background: transparent !important;
    color: #333 !important;
    padding: 0 0.7rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-align: left;
    /* Shrink-wrap to label + horizontal padding only (do not stretch toward Review) */
    flex: 0 0 auto;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    margin-top: 0 !important;
    box-sizing: border-box;
    align-self: flex-start;
    margin-left: 0 !important;
    line-height: 1.2;
}
#register-form-overlay .rap-compact-upload:hover,
#modify-form-overlay .rap-compact-upload:hover,
#register-form-overlay .rap-compact-upload:focus-visible,
#modify-form-overlay .rap-compact-upload:focus-visible {
    background: rgba(51, 51, 51, 0.06) !important;
    color: #333 !important;
    text-decoration: none;
    border-style: dotted !important;
}
.rap-compact-review {
    min-height: 40px;
    height: 40px;
    border-radius: 6px;
    padding: 0 0.7rem;
    white-space: nowrap;
    text-align: center;
    flex: 0 0 auto;
    margin-left: auto;
    margin-top: 0 !important;
}

/* Small screens: stack Upload + Review as full-width controls */
@media (max-width: 600px) {
    .rap-compact-row {
        flex-direction: column;
        align-items: stretch;
        row-gap: 8px;
    }
    .rap-compact-row .rap-compact-upload,
    .rap-compact-row .rap-compact-review {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
        justify-content: center;
        text-align: center;
        margin-left: 0 !important;
        align-self: stretch;
        box-sizing: border-box;
    }
}

.rap-compact-field {
    min-height: 40px;
}

#rap_compact_price::-webkit-outer-spin-button,
#rap_compact_price::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#rap_compact_price {
    -moz-appearance: textfield;
}
.rap-form-col-status {
    margin-top: 0.15rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #555;
}
.rap-form-col-status.rap-ai-panel__status--error,
.rap-form-col-status[style*="color: rgb(187, 0, 0)"] {
    color: #b00;
    font-weight: 600;
}

/* Right: review panel — no outer box (matches open layout of screen 1) */
.rap-ai-panel {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}
/* Main title on screen 2: same treatment as first screen (.rap-form-narrative-title) */
.rap-ai-panel__main-title {
    margin-bottom: 0.15rem;
}
.rap-ai-panel__header .rap-ai-panel__main-title {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}
.rap-ai-panel__sub {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: #555;
}

/* Review header tweaks: tighter UI, optional status lines hidden */
#rap_ai_panel .rap-ai-panel__header {
    padding-top: 0;
}
.rap-ai-panel__header .rap-form-flow-title {
    margin: 0 auto 0.2rem;
}
#modify-form-overlay .rap-ai-panel__header .rap-form-flow-title--modify {
    font-size: 2.65rem;
    margin-top: 28px;
}
#register-form-overlay .rap-ai-panel__header .rap-form-flow-title--register {
    font-size: 2.75rem;
    margin-top: 28px;
}
.rap-ai-panel__intro {
    margin: 0 auto 0.35rem;
    max-width: 26rem;
    font-size: 1rem;
    line-height: 1.45;
    color: #444;
    text-align: center;
}
.rap-ai-panel__intro-hint {
    margin: 0 auto 0.55rem;
    /* Wide enough for the first sentence to sit on one line on desktop
       (the Screen 2 overlay is >= 700px); still wraps on narrow screens. */
    max-width: 42rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #666;
    text-align: center;
}
/* Keep the "Please check…" sentence on its own line so the first sentence
   is never split mid-way when there is room for it. */
.rap-ai-panel__intro-hint-tail {
    display: block;
}
#rap_ai_panel .rap-ai-panel__sub {
    display: block;
    margin: 0 0 0.5rem;
}
#rap_ai_panel #rap_review_status_line {
    display: none;
    margin: 0;
    min-height: 0;
}
#rap_ai_panel #rap_review_status_line.rap-review-status-line--drafting {
    display: block;
    margin: 0 0 0.75rem;
    padding: 0.4rem 0;
    border-radius: 6px;
    background-color: var(--rap-derived-ai-bg, #f3f1e7);
    color: #444;
    text-align: left;
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 500;
    animation: rap-drafting-status-pulse 1.75s ease-in-out infinite;
}
#rap_ai_panel #rap_review_status_line.rap-review-status-line--error {
    display: block;
    margin: 0 0 0.75rem;
    color: #b00;
    font-style: normal;
    font-weight: 600;
}
#rap_preview_title_line.rap-preview-line--drafting,
#rap_preview_desc_line.rap-preview-line--drafting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b6355;
    font-style: italic;
    font-weight: 500;
    animation: rap-drafting-placeholder-pulse 1.75s ease-in-out infinite;
}
#rap_preview_desc_line.rap-preview-line--drafting {
    display: flex;
    overflow: visible;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}
/* Drafting: pale yellow = AI lane; italic pulsing placeholder only (empty field) */
#rap_ai_panel #rap_card_title #rap_ai_title.rap-field--drafting:placeholder-shown,
#rap_ai_panel #rap_card_title #rap_ai_description.rap-field--drafting:placeholder-shown {
    background: var(--rap-derived-ai-bg, #f3f1e7) !important;
    background-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
}
#rap_ai_panel .rap-field--drafting:placeholder-shown::placeholder,
#rap_ai_panel #rap_card_title .rap-field--drafting:placeholder-shown::placeholder {
    color: #6b6355 !important;
    font-style: italic !important;
    font-weight: 400 !important;
    opacity: 1 !important;
    animation: rap-drafting-placeholder-pulse 1.75s ease-in-out infinite;
}
.rap-draft-field-wrap {
    position: relative;
    width: 100%;
}
/* Per-field blocking: while the AI is drafting, lock each AI-filled card until
   its content has been applied. Cards get data-rap-drafting-done as each stage
   completes, which releases the lock section by section. */
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="title_desc"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="core_facts"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="development"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="features"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="utilities"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="additional_details"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="legal"]:not([data-rap-drafting-done]) .rap-preview-card__body {
    pointer-events: none;
    cursor: default;
}
/* Dim the not-yet-filled cards (but not title/description, whose pulsing pale
   yellow already signals the drafting state). */
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="core_facts"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="development"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="features"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="utilities"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="additional_details"]:not([data-rap-drafting-done]) .rap-preview-card__body,
#rap_ai_panel.rap-panel--drafting-locked [data-rap-card="legal"]:not([data-rap-drafting-done]) .rap-preview-card__body {
    opacity: 0.55;
    transition: opacity 0.25s ease;
}
@keyframes rap-drafting-status-pulse {
    0%, 100% { color: #444; }
    50% { color: #777; }
}
@keyframes rap-drafting-placeholder-pulse {
    0%, 100% { color: #6b6355; }
    50% { color: #9a9080; }
}
@media (prefers-reduced-motion: reduce) {
    #rap_ai_panel #rap_review_status_line.rap-review-status-line--drafting,
    #rap_preview_title_line.rap-preview-line--drafting,
    #rap_preview_desc_line.rap-preview-line--drafting {
        animation: none;
        color: #444;
    }
    #rap_ai_panel .rap-field--drafting:placeholder-shown::placeholder,
    #rap_ai_panel #rap_card_title .rap-field--drafting:placeholder-shown::placeholder {
        animation: none;
        color: #6b6355 !important;
        opacity: 1;
    }
}

/* v1.6 review: status line */
.rap-review-status-line {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #333;
    min-height: 1.35em;
}

/* Core facts — Listing (transaction + optional Commercial / New development) */
.rap-core-fieldset {
    border: 0;
    border-radius: 0;
    padding: 0;
    /* With .rap-core-transaction-row margin-bottom 0.5rem → total 1.25rem under pills = grid stack gap */
    margin: 0 0 0.75rem;
    background: transparent;
    font-size: 16px;
}

/* Core facts: a bit more air under the section title */
#rap_card_core .rap-preview-card__head {
    margin-bottom: 1rem;
}
/* Legal details: same title → first control gap as Core facts */
#rap_card_legal .rap-preview-card__head {
    margin-bottom: 1rem;
}
/* Contact & submit → first field */
#rap_card_contact .rap-preview-card__head {
    margin-bottom: 0.5rem;
}
/* Core facts: left-align selector rows, tighter vertical rhythm */
#rap_card_core .rap-preview-card__body {
    text-align: left;
}
#rap_card_core .rap-core-fieldset {
    margin-bottom: 0.2rem !important;
}
#rap_card_core .rap-core-fieldset[aria-label="Availability"] {
    margin-bottom: 0.8rem !important;
}
#rap_card_core .rap-core-transaction-row {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    margin-bottom: 0.12rem;
}
#rap_card_core .rap-core-transaction-row .rap-core-radio-label:first-of-type {
    padding-left: 0 !important;
}
#rap_card_core .rap-property-type-row {
    justify-content: flex-start;
}
#rap_card_core .rap-core-grid-modern .rap-seg {
    align-self: flex-start;
}
#rap_card_core .rap-seg .rap-seg-btn:first-child,
#rap_card_legal .rap-tenure-seg .rap-seg-btn:first-child {
    padding-left: 0 !important;
}
#rap_card_core .rap-property-type-row .rap-core-type-addons--property-row {
    margin-top: 0 !important;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    border: 0;
    padding: 0;
}
/* Core facts listing toolbar: For sale / To rent · House / Flat · New development · Auction */
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.25rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.22rem;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar__segment {
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar__segment[hidden],
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar .rap-auction-standalone-wrap[hidden] {
    display: none !important;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar .rap-core-transaction-row {
    margin-bottom: 0 !important;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar .rap-auction-standalone-wrap {
    margin-top: 0 !important;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar .rap-core-type-addons {
    margin-top: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* LDS development sites: For sale + Auction on one compact row; Current / Proposed use below */
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar--lds-dev {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar--lds-dev > .lds-listing-tx-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    width: auto;
    max-width: 100%;
    align-self: flex-start;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar--lds-dev > .lds-listing-tx-row .rap-core-transaction-row {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    align-self: center !important;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar--lds-dev > .lds-listing-tx-row .rap-auction-standalone-wrap {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    align-self: center !important;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar--lds-dev > #rap_core_listing_toolbar_property_type.lds-asset-uses-toolbar,
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar--lds-dev > #rap_core_listing_toolbar_property_type {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    width: auto;
    max-width: 100%;
    align-self: flex-start;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar--lds-dev > #rap_core_listing_toolbar_property_type[hidden] {
    display: none !important;
}
#rap_ai_panel #rap_card_core .lds-asset-use-seg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
}
#rap_ai_panel #rap_card_core .lds-asset-use-seg__label,
#rap_ai_panel #rap_card_core .lds-permission-use__label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #555;
}

/* Existing / Proposed: match Core facts row layout + Legal details pill shells */
#rap_ai_panel #rap_card_existing,
#rap_ai_panel #rap_card_proposed {
    --rap-core-label-col: 12.75rem;
}
#rap_ai_panel #rap_card_existing .lds-scheme-mix,
#rap_ai_panel #rap_card_proposed .lds-scheme-mix {
    display: flex;
    flex-direction: column;
    /* Match Core facts Postcode↔UPRN (pp-block gap) */
    gap: 0.35rem;
    width: 100%;
}
/* Houses + Flats: tighter than Postcode↔UPRN (text baselines sit closer) */
#rap_ai_panel #rap_card_existing .lds-scheme-mix__counts,
#rap_ai_panel #rap_card_proposed .lds-scheme-mix__counts {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
}
#rap_ai_panel #rap_card_existing .lds-scheme-mix > .rap-core-field-stack,
#rap_ai_panel #rap_card_proposed .lds-scheme-mix > .rap-core-field-stack {
    gap: 0;
    margin: 0;
}
/* Kill postcode-line / body-input padding that opens Houses↔Flats */
#rap_ai_panel #rap_card_existing .lds-scheme-mix .lds-mix-count-row,
#rap_ai_panel #rap_card_proposed .lds-scheme-mix .lds-mix-count-row {
    margin: 0 !important;
    padding: 0 !important;
    row-gap: 0 !important;
    min-height: 0 !important;
    align-items: center !important;
}
#rap_ai_panel #rap_card_existing .lds-scheme-mix .lds-mix-count-row + .lds-mix-count-row,
#rap_ai_panel #rap_card_proposed .lds-scheme-mix .lds-mix-count-row + .lds-mix-count-row {
    margin-top: -0.15rem !important;
}
#rap_ai_panel #rap_card_existing .rap-preview-card__body .lds-mix-count-input,
#rap_ai_panel #rap_card_proposed .rap-preview-card__body .lds-mix-count-input,
#rap_ai_panel #rap_card_existing .lds-scheme-mix .lds-mix-count-input,
#rap_ai_panel #rap_card_proposed .lds-scheme-mix .lds-mix-count-input {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--postcode,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--postcode {
    display: grid !important;
    grid-template-columns: var(--rap-core-label-col) 1fr;
    column-gap: 0.15rem;
    row-gap: 0.35rem;
    align-items: baseline !important;
    width: 100%;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--postcode .rap-core-inline-prefix,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--postcode .rap-core-inline-prefix {
    grid-column: 1;
    text-align: left;
    justify-self: start;
    box-sizing: border-box;
    font-size: 1.25rem;
    font-weight: 400;
    color: #555;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--postcode .rap-postcode-input,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--postcode .rap-postcode-input {
    grid-column: 2;
    width: auto !important;
    max-width: 24ch !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    line-height: 1.2 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--postcode .rap-postcode-input::placeholder,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--postcode .rap-postcode-input::placeholder {
    font-weight: 400 !important;
    color: #888 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #888 !important;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--internal-area-inline,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--internal-area-inline {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center !important;
    gap: 0.35rem;
    width: 100%;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--internal-area-inline .rap-internal-area-amount-group,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--internal-area-inline .rap-internal-area-amount-group {
    display: grid !important;
    grid-template-columns: var(--rap-core-label-col) auto;
    column-gap: 0.15rem;
    align-items: center;
    align-self: center;
    flex: 0 1 auto;
    min-width: 0;
    width: calc(var(--rap-core-label-col) + 0.15rem + 15.5ch);
    max-width: 100%;
    box-sizing: border-box;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--internal-area-inline .rap-core-inline-prefix,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--internal-area-inline .rap-core-inline-prefix {
    grid-column: 1;
    text-align: left;
    justify-self: start;
    font-size: 1.25rem;
    font-weight: 400;
    color: #555;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input {
    grid-column: 2;
    width: auto;
    max-width: 9.5rem;
    min-width: 2ch;
    field-sizing: content;
    justify-self: start;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    line-height: 1.2 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input:placeholder-shown,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input:placeholder-shown {
    min-width: min(100%, 18ch);
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input::placeholder,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input::placeholder {
    font-weight: 400 !important;
    color: #888 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #888 !important;
}
#rap_ai_panel #rap_card_existing .rap-core-field-stack__value--internal-area-inline .rap-core-unit-seg--inline,
#rap_ai_panel #rap_card_proposed .rap-core-field-stack__value--internal-area-inline .rap-core-unit-seg--inline {
    flex: 0 1 auto;
    min-width: 0;
    align-self: auto;
}
#rap_ai_panel #rap_card_existing .rap-core-unit-seg--inline .rap-seg-btn,
#rap_ai_panel #rap_card_proposed .rap-core-unit-seg--inline .rap-seg-btn {
    padding: 0.45rem 0.9rem !important;
    line-height: 1.25 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    min-height: 0 !important;
    height: auto !important;
    align-items: center !important;
}
#rap_ai_panel #rap_card_proposed .lds-planning-status-seg {
    margin-top: 0.75rem;
    width: 100%;
}
#rap_ai_panel #rap_card_proposed .lds-proposed-use-classes {
    margin-top: 0.75rem;
    width: 100%;
    min-width: 0;
}
#rap_ai_panel #rap_card_proposed .lds-proposed-use-classes__label {
    margin: 0 0 0.35rem;
    color: #555;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
}
#rap_ai_panel #rap_card_proposed .lds-proposed-use-classes .rap-seg-flow {
    width: 100%;
}
#rap_ai_panel #rap_card_proposed .lds-proposed-use-classes__seg .rap-seg-btn {
    padding-right: 0.72rem !important;
    padding-left: 0.72rem !important;
}

/* Commercial use subtypes live inside Features (shown when NIA/GIA is set) */
#rap_ai_panel #rap_card_features .lds-commercial-uses-in-features {
    margin: 0 0 0.85rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid #e8e8e8;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
#rap_ai_panel #rap_card_features .lds-commercial-uses-in-features[hidden] {
    display: none !important;
}
#rap_ai_panel #rap_card_features .lds-commercial-uses-in-features__title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    line-height: 1.25;
}
#rap_ai_panel #rap_card_features .lds-commercial-uses__intro {
    margin: 0 0 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #555;
}
#rap_ai_panel #rap_card_features .lds-commercial-uses {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}
#rap_ai_panel #rap_card_features .lds-commercial-uses__group-label {
    display: block;
    margin: 0 0 0.22rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #777;
}
#rap_ai_panel #rap_card_features .lds-commercial-uses__group {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
#rap_ai_panel #rap_card_features .lds-commercial-uses .rap-seg-flow,
#rap_ai_panel #rap_card_features .lds-commercial-uses__flow {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.4rem;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}
#rap_ai_panel #rap_card_features .lds-commercial-uses__seg,
#rap_ai_panel #rap_card_features .lds-commercial-uses .rap-seg-flow > .rap-seg {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    align-self: flex-start !important;
}
#rap_ai_panel #rap_card_features .lds-commercial-uses__seg .rap-seg-btn,
#rap_ai_panel #rap_card_features .lds-commercial-uses .rap-seg-flow > .rap-seg .rap-seg-btn {
    white-space: nowrap;
    flex-shrink: 0;
}
#rap_card_core .rap-core-pp-block {
    gap: 0.35rem;
}
#rap_card_core .rap-core-pp-block .rap-core-field-stack {
    gap: 0;
}
#rap_card_core .rap-core-field-stack--postcode-block {
    gap: 3px !important;
    margin-bottom: -0.14rem;
}
/* When Address row is visible: drop extra postcode margin-top and use a tight flex gap so Address→Postcode ≈ Postcode→UPRN. */
#rap_card_core .rap-core-field-stack--postcode-block:has(#rap_ai_address_line_wrap:not([hidden])) {
    gap: 0 !important;
}
#rap_card_core .rap-core-field-stack--postcode-block:has(#rap_ai_address_line_wrap:not([hidden])) .rap-core-field-stack__value--postcode-line {
    margin-top: -1px !important;
}
#rap_card_core .rap-core-field-stack {
    gap: 4px;
}

/* Title & description: no visible labels — placeholders; title text bold when entered */
#rap_card_title #rap_ai_title.rap-title-field {
    font-weight: 700 !important;
    line-height: 1.35;
    overflow-y: hidden !important;
    overflow-x: hidden;
    max-height: none !important;
    resize: none !important;
    min-height: 0;
    white-space: pre-wrap;
    word-break: break-word;
}
#rap_card_title #rap_ai_title.rap-title-field::placeholder {
    font-weight: 400 !important;
    color: #757575;
    opacity: 1;
}
#rap_card_title #rap_ai_description::placeholder {
    color: #757575;
    opacity: 1;
}
/* Section 2: left-align title & description — separate fields, no gap between */
#rap_card_title .rap-title-desc-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    width: 100%;
    gap: 0;
    overflow: visible;
}
#rap_card_title .rap-title-desc-body #rap_ai_title,
#rap_card_title .rap-title-desc-body #rap_ai_description {
    margin: 0 !important;
}
#rap_card_title .rap-title-desc-body #rap_ai_title {
    padding-top: 0.4rem !important;
    padding-bottom: 0.15rem !important;
    border-bottom: none !important;
    border-radius: 4px 4px 0 0 !important;
}
#rap_card_title .rap-title-desc-body .rap-draft-field-wrap:first-of-type {
    position: relative;
    z-index: 1;
    overflow: visible;
}
#rap_card_title .rap-title-desc-body .rap-draft-field-wrap:last-of-type {
    margin-top: -2px;
    overflow: visible;
}
#rap_card_title .rap-title-desc-body #rap_ai_description {
    padding-top: 0.15rem !important;
    padding-bottom: 0.4rem !important;
    margin-top: 0 !important;
    border-top: none !important;
    border-radius: 0 0 4px 4px !important;
}
#rap_card_title .rap-title-desc-body .rap-ai-field {
    text-align: left !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
#rap_card_title .rap-title-desc-body #rap_ai_title,
#rap_card_title .rap-title-desc-body #rap_ai_description,
#rap_card_title .rap-title-desc-body .rap-ai-field {
    padding-left: 0 !important;
    padding-right: 0.5rem !important;
}
/* Description grows with content (no inner scroll) — height set by JS */
#rap_card_title #rap_ai_description {
    overflow-y: hidden !important;
    overflow-x: hidden;
    resize: none !important;
    max-height: none !important;
    min-height: 0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4;
}
/* Mirror textarea stays in the form for submit; rich editor is what the user sees. */
#rap_card_title #rap_ai_description.rap-description-textarea--mirror {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
#rap_card_title .rap-description-rich {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    padding-top: 0.15rem !important;
    padding-bottom: 0.4rem !important;
    padding-left: 0 !important;
    padding-right: 0.5rem !important;
    border-top: none !important;
    border-radius: 0 0 4px 4px !important;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    outline: none;
    min-height: 1.4em;
}
#rap_card_title .rap-description-rich p {
    margin: 0;
    padding: 0;
}
/* Modest gap between paragraphs — more than wrapped lines, less than a full blank line. */
#rap_card_title .rap-description-rich p + p {
    margin-top: 0.55em;
}
#rap_card_title .rap-description-rich:empty::before,
#rap_card_title .rap-description-rich:has(> p:only-child:empty)::before,
#rap_card_title .rap-description-rich:has(> p:only-child > br:only-child)::before {
    content: attr(data-placeholder);
    color: #9a9a9a;
    pointer-events: none;
}
#rap_ai_panel #rap_card_title .rap-description-rich.rap-derived-value--ai,
#rap_ai_panel #rap_card_title .rap-description-rich.rap-derived-value--api,
#rap_ai_panel #rap_card_title .rap-description-rich.rap-field--drafting:has(> p:only-child > br:only-child),
#rap_ai_panel #rap_card_title .rap-description-rich.rap-field--drafting:empty {
    background: var(--rap-derived-ai-bg, #f3f1e7) !important;
    background-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
}
.rap-core-legend {
    display: none;
}
.rap-core-transaction-row {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0;
    align-items: center;
    margin-bottom: 0.5rem;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}
.rap-core-radio-label {
    font-weight: 500;
    font-size: 16px !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border: 0;
    border-right: 1px solid #bbb;
    padding: 0 0.6rem;
    padding-top: 0.4rem !important;
    height: 30px;
    min-height: 30px;
    line-height: normal;
    box-sizing: border-box;
    position: static;
    background: transparent;
    color: #333;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rap-core-transaction-row .rap-core-radio-label:last-child {
    border-right: 0;
}

/* Make selected radios clearly "solid" */
.rap-core-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}

.rap-core-radio-label:has(input[type="radio"]:checked) {
    background: #333;
    color: #fff;
}
.rap-core-radio-label:hover:not(:has(input[type="radio"]:checked)) {
    background: #4a4a4a;
    color: #fff;
}
/* Core facts only: listing type — uppercase bold, grey / black text, no fill (reversible tweak) */
#rap_card_core .rap-core-transaction-row .rap-core-radio-label {
    font-weight: 400 !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: transparent !important;
    color: #888;
    font-size: 1.25rem !important;
}

/* Segmented selectors: no vertical padding, text-height rows (Core + Legal).
   Inline m²/sq ft and PCM/PW pills keep Development Completion pill height instead. */
#rap_card_core .rap-core-transaction-row .rap-core-radio-label,
#rap_card_core .rap-seg:not(.rap-core-unit-seg--inline):not(.rap-price-rent-seg):not(.rap-price-sale-seg) .rap-seg-btn,
#rap_card_legal .rap-tenure-seg .rap-seg-btn {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
    align-items: baseline;
}
#rap_card_core .rap-core-transaction-row .rap-core-radio-label:has(input[type="radio"]:checked) {
    background: transparent !important;
    color: #333 !important;
    font-weight: 700 !important;
}
#rap_card_core .rap-core-transaction-row .rap-core-radio-label:hover:not(:has(input[type="radio"]:checked)) {
    background: transparent !important;
    color: #666;
}
#rap_card_core .rap-core-transaction-row .rap-core-radio-label:has(input[type="radio"]:checked):hover {
    background: transparent !important;
    color: #333 !important;
}
.rap-core-type-addons {
    margin-top: 0.5rem;
    padding-top: 0;
    border-top: 0;
}
/* Property type + New development on one row; gap separates segment from checkbox (no divider) */
.rap-property-type-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.25rem;
    width: 100%;
    margin-bottom: 0;
}
#rap_ai_panel #rap_card_core .rap-property-type-row {
    margin-bottom: 0.22rem;
}
.rap-property-type-row .rap-property-type-seg {
    flex: 0 0 auto;
}
.rap-core-addons-hint {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    color: #555;
}
.rap-core-addons-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.9rem;
}
.rap-core-check-label {
    font-weight: 500;
    font-size: 16px !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #b6b6b6;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    background: transparent;
    color: #333;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rap-core-check-label:hover:not(:has(input[type="checkbox"]:checked)) {
    background: #4a4a4a;
    color: #fff;
    border-color: #4a4a4a;
}
.rap-core-check-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
.rap-core-check-label:has(input[type="checkbox"]:checked) {
    background: #333;
    border-color: #333;
    color: #fff;
}
/* New development: own line, caps — light default, darker hover, very dark selected (no fill) */
#rap_card_core .rap-core-check-label--plain {
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0.15rem 0 !important;
    background: transparent !important;
    font-weight: 400 !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #888 !important;
    font-size: 1.25rem !important;
    transition: color 0.15s ease, background-color 0.15s ease;
}
#rap_card_core .rap-core-check-label--plain:hover:not(:has(input[type="checkbox"]:checked)) {
    background: transparent !important;
    color: #666 !important;
    border-color: transparent !important;
}
#rap_card_core .rap-core-check-label--plain:has(input[type="checkbox"]:checked) {
    border: 0 !important;
    background: transparent !important;
    color: #333 !important;
    padding: 0.15rem 0 !important;
    font-weight: 700 !important;
}

.rap-core-grid-modern {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

/* Core facts: compact vertical gap between rows */
#rap_card_core .rap-core-grid-modern {
    gap: 0.42rem;
}
/* Hidden sync fields must not sit in the flex flow (would add extra gaps) */
#rap_card_core .rap-core-grid-modern > input[type="hidden"] {
    display: none !important;
}

/* Property-type and price-type values sync via off-screen / hidden selects + segmented buttons */
.rap-core-grid-modern > select#rap_ai_property_type,
#rap_card_legal .rap-legal-grid-modern > select#rap_ai_tenure {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.rap-seg {
    display: inline-flex;
    border: 1px solid #bbb;
    border-radius: 999px;
    overflow: hidden;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    margin: 0;
}
/* Core facts + Legal: segmented groups — no outer ring; vertical rules only between options */
#rap_card_core .rap-seg,
#rap_card_legal .rap-seg {
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible;
}
/* [hidden] must win over display:inline-flex (otherwise PCM/PW stays visible and leaves a gap) */
.rap-seg[hidden],
#rap_price_rent_seg[hidden],
#rap_price_sale_seg[hidden],
#rap_availability_reason_seg[hidden],
#rap_under_offer_seg[hidden] {
    display: none !important;
}

.rap-availability-fieldset {
    margin: 0 0 0.75rem;
}
.rap-availability-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

/* Theme .custom-form-overlay button { border:none } removes these — restore below for #rap_card_core */
.rap-seg-btn {
    border: 0;
    border-right: 1px solid #bbb; /* thin separator between connected pills */
    background: transparent;
    padding: 0.34rem 0.6rem !important;
    font-size: 16px !important;
    min-height: 34px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    white-space: nowrap;
    margin-top: 0 !important;
    border-radius: 0 !important;
}
.rap-seg-btn:last-child {
    border-right: 0;
}

/* Core facts + Legal segmented pills: vertical dividers only (+ beat overlay button reset) */
#rap_card_core .rap-seg .rap-seg-btn,
#rap_card_legal .rap-seg .rap-seg-btn {
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 1px solid #bbb !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    padding: 0.34rem 0.6rem !important;
    font-size: 16px !important;
    line-height: 1 !important;
    overflow: visible !important;
}
#rap_card_core .rap-seg .rap-seg-btn:last-child,
#rap_card_legal .rap-seg .rap-seg-btn:last-child {
    border-right: 0 !important;
}
/* Hide individual pills (e.g. From only for New development) — beat overlay button resets */
#rap_card_core .rap-seg .rap-seg-btn[hidden],
#rap_card_legal .rap-seg .rap-seg-btn[hidden] {
    display: none !important;
}
.rap-seg-btn.is-active {
    background: #333;
    color: #fff;
}
.rap-seg-btn:hover:not(.is-active) {
    background: #4a4a4a;
    color: #fff;
}
/* Core facts segments + Legal tenure — same text treatment as listing row */
#rap_card_core .rap-seg .rap-seg-btn,
#rap_card_legal .rap-tenure-seg .rap-seg-btn {
    font-weight: 400 !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: transparent !important;
    color: #888 !important;
    font-size: 1.25rem !important;
    -webkit-text-fill-color: #888;
}
#rap_card_core .rap-seg .rap-seg-btn.is-active,
#rap_card_legal .rap-tenure-seg .rap-seg-btn.is-active {
    background: transparent !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
    font-weight: 700 !important;
}
#rap_card_core .rap-seg .rap-seg-btn:hover:not(.is-active),
#rap_card_legal .rap-tenure-seg .rap-seg-btn:hover:not(.is-active) {
    background: transparent !important;
    color: #666 !important;
    -webkit-text-fill-color: #666;
}
#rap_card_core .rap-seg .rap-seg-btn.is-active:hover,
#rap_card_legal .rap-tenure-seg .rap-seg-btn.is-active:hover {
    background: transparent !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
}

/* Postcode + Price (Core: labels optional in markup; placeholders carry meaning) */
.rap-core-pp-block {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}
#rap_card_core .rap-core-field-stack,
#rap_card_legal .rap-core-field-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
}
#rap_card_legal .rap-core-field-stack {
    gap: 4px;
}
#rap_card_core .rap-core-field-stack__value,
#rap_card_legal .rap-core-field-stack__value {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
    width: 100%;
}
#rap_card_core .rap-core-field-stack__value--postcode {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1ch;
}
#rap_card_core .rap-core-field-stack__value--address {
    display: inline-flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 1ch;
    overflow: visible;
}
#rap_card_core .rap-core-field-stack__value--postcode-line .rap-core-inline-prefix,
#rap_card_core .rap-core-field-stack__value--address-line .rap-core-inline-prefix {
    width: 8.2rem;
    flex: 0 0 8.2rem;
}
#rap_card_core .rap-core-inline-prefix {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    flex: 0 0 auto;
    line-height: 1.2;
}

/* Core: once the user enters a value, make the inline prefix normal weight */
#rap_card_core .rap-core-field-stack__value--postcode:has(.rap-postcode-input:not(:placeholder-shown)) .rap-core-inline-prefix,
#rap_card_core .rap-price-amount-group:has(input.rap-price-input:not(:placeholder-shown)) .rap-core-inline-prefix {
    font-weight: 400;
}
#rap_card_core .rap-price-amount-group {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 1ch;
    flex: 0 0 auto;
    min-width: 0;
}
#rap_card_core .rap-core-field-stack__value--price {
    gap: 0.32rem;
}
#rap_card_core .rap-core-field-stack__value--price .rap-price-rent-seg:not([hidden]) {
    margin-inline-start: 0.6rem;
}

/* Legal details: vertical stack like Core facts price/postcode */
#rap_card_legal .rap-legal-tenure-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    justify-content: flex-start;
    margin: 0;
}
#rap_card_legal .rap-legal-tenure-row .rap-seg {
    align-self: flex-start;
}
#rap_card_legal .rap-legal-grid-modern {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.42rem;
    width: 100%;
    position: relative;
}
#rap_card_legal .rap-core-field-stack__value--legal-lease {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1ch;
}
#rap_card_legal .rap-legal-inline-prefix {
    font-size: 1.25rem;
    font-weight: 400;
    color: #333;
    flex: 0 0 auto;
    line-height: 1.2;
}
#rap_card_legal .rap-legal-lease-field {
    display: inline-flex;
    align-items: baseline;
    gap: 0.75ch;
    flex: 0 0 auto;
    min-width: 0;
}
#rap_card_legal .rap-legal-lease-field:has(#rap_ai_lease_years_remaining) {
    gap: 0.28ch;
}
#rap_card_legal .rap-preview-card__body .rap-core-field-stack__value input.rap-legal-stack-input.rap-legal-lease-input {
    /* Prevent the general legal input min-width from creating extra visual spacing */
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto;
    overflow: hidden;
    text-overflow: clip;
}
#rap_card_legal .rap-legal-lease-suffix {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    flex: 0 0 auto;
}

/* Legal money (Ground rent / Service charge) */
#rap_card_legal .rap-core-field-stack__value--legal-money {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1ch;
}
#rap_card_legal .rap-legal-money-group {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0.5ch;
    flex: 0 0 auto;
    min-width: 0;
}
#rap_card_legal .rap-legal-money-symbol {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}
#rap_card_legal .rap-legal-lease-field input:placeholder-shown + .rap-legal-lease-suffix {
    display: none;
}
#rap_card_legal .rap-preview-card__body .rap-core-field-stack__value input.rap-legal-stack-input {
    width: auto !important;
    max-width: 16ch !important;
    min-width: 8ch !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    line-height: 1.2 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
}

/* Lease years remaining: override fixed-ish min-width so "900" + "years" spacing is ~1ch */
#rap_card_legal .rap-preview-card__body .rap-core-field-stack__value input.rap-legal-stack-input.rap-legal-lease-input {
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
}

/* Shared ownership %: track content width so "% share available" sits right after the
   number the user types. When empty the placeholder ("Enter share available") shows
   and the suffix is hidden by the :placeholder-shown rule above. */
#rap_card_legal .rap-preview-card__body .rap-core-field-stack__value input.rap-legal-stack-input.rap-legal-lease-input#rap_ai_shared_ownership_pct {
    field-sizing: content;
    min-width: 2ch !important;
    max-width: 18rem !important;
}

#rap_card_legal .rap-legal-stack-input::placeholder {
    font-weight: 400;
    color: #888 !important;
    /* The input sets -webkit-text-fill-color:#333 for the typed value, which
       also tints the placeholder dark in WebKit unless reset here. */
    -webkit-text-fill-color: #888 !important;
    opacity: 1 !important;
}
/* No spinner arrows on lease / ground rent / service charge */
#rap_card_legal input.rap-legal-stack-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
#rap_card_legal input.rap-legal-stack-input[type="number"]::-webkit-outer-spin-button,
#rap_card_legal input.rap-legal-stack-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Match legal-details spacing between £ and the amount. */
.rap-price-sterling {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5ch;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}
.rap-price-sterling .rap-currency {
    font-weight: 700;
    font-size: 1.25rem;
    color: #333;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}
.rap-price-input {
    width: auto !important;
    min-width: 6ch !important;
    max-width: 11ch !important;
    flex: 0 0 auto;
    border: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    padding-left: 0 !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    line-height: 1.2 !important;
}
.rap-core-grid-modern .rap-price-sale-seg .rap-seg-btn {
    font-size: 15px !important;
    padding: 0.34rem 0.6rem !important;
}

.rap-price-input-wrap {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0.4rem;
    min-height: 34px;
    flex: 0 0 auto;
    max-width: fit-content;
    margin: 0;
}
.rap-currency {
    font-weight: 700;
    font-size: 1.25rem;
    color: #333;
}

/* Stop theme full-width inputs in Core facts postcode/price */
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input[type="text"].rap-price-input {
    width: auto !important;
    max-width: 11ch !important;
    padding: 0 !important;
    margin: 0 !important;
}
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input[type="text"].rap-postcode-input {
    width: auto !important;
    max-width: 24ch !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
}
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bedrooms-input,
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bathrooms-input {
    width: auto !important;
    max-width: 12ch !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    line-height: 1.2 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
    -moz-appearance: textfield;
    appearance: textfield;
}
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bedrooms-input::-webkit-outer-spin-button,
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bedrooms-input::-webkit-inner-spin-button,
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bathrooms-input::-webkit-outer-spin-button,
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bathrooms-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bedrooms-input::placeholder,
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bathrooms-input::placeholder {
    font-weight: 400;
    color: #888;
    opacity: 1;
    -webkit-text-fill-color: #888;
}
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-postcode-input::placeholder,
#rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-price-input::placeholder {
    font-weight: 400 !important;
    color: #888 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #888 !important;
}

.rap-postcode-input {
    width: auto !important;
    min-width: 140px;
    flex: 0 0 auto;
    display: inline-block !important;
    border: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    padding-left: 0.1rem !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700;
}
.rap-postcode-input:not(:placeholder-shown) {
    font-weight: 700;
}
.rap-address-selected-input {
    width: auto !important;
    min-width: 0;
    max-width: 42ch;
    flex: 1 1 34ch;
    display: block !important;
    border: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 0 0 calc(0.42rem + 3px) !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    line-height: 1.2 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
    resize: none;
    overflow-y: hidden;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 1.3em;
}
.rap-address-selected-input::placeholder {
    font-weight: 400 !important;
    color: #888 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #888 !important;
}
.rap-address-toggle {
    margin-left: 0;
    align-self: center !important;
    border: 0;
    background: transparent;
    color: #333;
    cursor: pointer;
    font-size: 0;
    font-weight: 900;
    line-height: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    overflow: visible !important;
    justify-self: end;
    grid-column: 3;
    grid-row: 1;
}
.rap-address-toggle span {
    display: none;
}
.rap-address-toggle::before {
    content: '';
    display: block;
    width: 0.72rem;
    height: 0.72rem;
    box-sizing: border-box;
    border-right: 0.18rem solid #333;
    border-bottom: 0.18rem solid #333;
    transform: translateY(-8px) rotate(45deg);
    transform-origin: 50% 50%;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.rap-address-toggle[aria-expanded="true"]::before {
    transform: translateY(-8px) rotate(-135deg);
}
.rap-address-toggle[disabled] {
    opacity: 0.35;
    cursor: default;
}
.rap-address-toggle:hover,
.rap-address-toggle:focus-visible {
    background: transparent !important;
    color: #7a7a7a;
}
.rap-address-toggle:hover::before,
.rap-address-toggle:focus-visible::before {
    border-color: #7a7a7a;
}

/* Keep all segmented controls visually same height and allow full text */
.rap-core-transaction-row .rap-core-radio-label,
.rap-property-type-seg .rap-seg-btn,
.rap-tenure-seg .rap-seg-btn,
.rap-price-rent-seg .rap-seg-btn,
.rap-price-sale-seg .rap-seg-btn {
    min-height: 30px;
}

/* Keep core facts rows aligned with the transaction control rhythm */
.rap-core-grid-modern > .rap-seg,
.rap-core-grid-modern > .rap-property-type-row,
.rap-core-grid-modern > .rap-core-pp-block {
    margin-top: 0;
    margin-bottom: 0;
}

/* Prevent legacy grid/button rules from squeezing segmented controls */
.rap-form-grid.rap-core-grid-modern {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    grid-template-columns: none !important;
}
#rap_card_core.rap-form-grid.rap-core-grid-modern,
#rap_card_core .rap-form-grid.rap-core-grid-modern {
    gap: 0.42rem;
}

.rap-core-grid-modern .rap-seg,
.rap-core-grid-modern .rap-core-transaction-row {
    max-width: 100%;
    width: fit-content;
}

/* Remove any stray number input rows in modern core facts */
.rap-core-grid-modern > input[type="number"]:not(.rap-price-input) {
    display: none !important;
}
.rap-hidden-sale-rent-sync {
    display: none !important;
}

.rap-development-scope-wrap {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}
.rap-scope-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.rap-radio-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 1rem;
    font-weight: normal;
}

/* Preview cards (read-first) */
.rap-preview-card {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #d3d3d3;
}
.rap-preview-card:last-of-type {
    border-bottom: none;
}
.rap-preview-card__head {
    display: block;
    margin-bottom: 0.5rem;
}
#rap_card_title .rap-preview-card__head {
    margin-bottom: 0.28rem;
}
.rap-preview-card__title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    letter-spacing: -0.01em;
}
.rap-preview-card__hint {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: #666;
}
/* Inline preview strips (optional); hidden — users edit fields directly */
.rap-preview-card__read {
    display: none !important;
}
.rap-preview-card__body {
    display: block;
}
.rap-preview-card__body > label:not(.rap-form-terms):not(.rap-radio-inline):not(.rap-feature-chip):not(.cat-option):not(.screen-reader-text) {
    display: block;
    margin-top: 0.6rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}
.rap-preview-card__body input[type="text"],
.rap-preview-card__body input[type="email"],
.rap-preview-card__body input[type="number"],
.rap-preview-card__body textarea,
.rap-preview-card__body select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.5rem;
}
.rap-preview-headline {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.15rem;
    line-height: 1.25;
}
.rap-preview-desc {
    margin: 0;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rap-preview-desc.rap-preview-desc--expanded {
    display: block;
    -webkit-line-clamp: unset;
}
.rap-read-more-btn {
    margin-top: 0.35rem;
    padding: 0;
    border: none;
    background: none;
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
}
.rap-preview-core-line,
.rap-preview-legal-line,
.rap-preview-features-line,
.rap-preview-contact-line {
    margin: 0;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.4;
}

.rap-categories-advanced {
    margin: 0.75rem 0;
    font-size: 0.9rem;
}
.rap-categories-advanced summary {
    cursor: pointer;
    font-weight: 600;
    color: #555;
}

/* Section 6: categories UI hidden; Core facts + JS still sync name="categories[]" for submit */
#rap_card_contact .rap-categories-advanced {
    display: none !important;
}

/* Section 6: Postcode-style inline labels (bold label when empty / light placeholder; normal label + bold value when filled) */
#rap_card_contact .rap-contact-inline-fields {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
}
#rap_card_contact .rap-contact-field-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    margin: 0;
}
#rap_card_contact .rap-contact-field-stack__value {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1ch;
    min-width: 0;
    width: 100%;
}
#rap_card_contact .rap-contact-inline-prefix {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    flex: 0 0 auto;
    line-height: 1.2;
}
#rap_card_contact .rap-contact-field-stack__value:has(.rap-contact-inline-input:not(:placeholder-shown)) .rap-contact-inline-prefix {
    font-weight: 400;
}
#rap_card_contact .rap-preview-card__body .rap-contact-inline-input[type="text"],
#rap_card_contact .rap-preview-card__body .rap-contact-inline-input[type="email"] {
    width: auto !important;
    max-width: 100% !important;
    flex: 1 1 10rem;
    min-width: min(100%, 10ch);
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    color: #333;
}
#rap_card_contact .rap-contact-inline-input::placeholder {
    color: #888;
    -webkit-text-fill-color: #888;
    font-weight: 400;
    opacity: 1;
}

#rap_card_contact #estate_agent.rap-estate-agent--locked,
#rap_card_contact #estate_agent[readonly] {
    cursor: default;
    color: #444;
    opacity: 0.92;
}

#rap_card_contact .rap-form-terms--contact {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    margin-top: 0.5rem;
    margin-bottom: 20px;
    text-align: left;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
}
#rap_card_contact .rap-form-terms--contact input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    min-width: 1.05rem;
    margin: 0;
    flex-shrink: 0;
    align-self: center;
    accent-color: #333;
    cursor: pointer;
}
#rap_card_contact .rap-form-terms__text {
    flex: 1 1 auto;
    min-width: 0;
}
#rap_card_contact .rap-form-terms__text .terms-link {
    font-weight: inherit;
}

.rap-form-actions .rap-review-cta-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.65rem;
    align-items: flex-end;
    margin-top: 0.75rem;
    width: 100%;
    min-width: 0;
}
.rap-form-actions .rap-review-cta-row .rap-save-draft-btn,
.rap-form-actions .rap-review-cta-row .submit-button {
    box-sizing: border-box;
    min-height: 3.125rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.35;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.rap-form-actions .rap-review-cta-row .rap-save-draft-btn {
    flex: 0 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
.rap-form-actions .rap-review-cta-row .submit-button {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
#register-form-overlay .rap-form-actions .rap-review-cta-row .submit-button {
    margin-left: auto;
}

/* Small screens: stack Back + Submit as full-width controls */
@media (max-width: 600px) {
    .rap-form-actions .rap-review-cta-row {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 8px;
    }
    .rap-form-actions .rap-review-cta-row .rap-save-draft-btn,
    .rap-form-actions .rap-review-cta-row .submit-button {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
        margin-left: 0 !important;
        align-self: stretch;
    }
    /* Allow multi-line instructional CTA to grow (desktop locks height at 40px) */
    #register-form-overlay .rap-form-actions .rap-review-cta-row .submit-button,
    #modify-form-overlay .rap-form-actions .rap-review-cta-row .submit-button {
        height: auto !important;
        max-height: none !important;
        min-height: 40px !important;
        padding-top: 0.65rem !important;
        padding-bottom: 0.65rem !important;
        white-space: normal;
        line-height: 1.3 !important;
    }
}

/* Blocked / incomplete: instructional label stays sentence case */
.rap-form-actions .rap-review-cta-row .submit-button.rap-submit-primary--blocked {
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}
/* Ready to submit (no blockers): strong CTA */
.rap-form-actions .rap-review-cta-row .submit-button:not(.rap-submit-primary--blocked) {
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
}

/* Review photos: hide native “Choose file” UI; use same grey control as screen 1 */
.rap-review-photos-picker-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
}
#rap_card_photos .image-field input[type="file"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
}
#rap_card_photos .image-field {
    position: relative;
}
#rap_card_photos .rap-review-photos-upload {
    margin-bottom: calc(0.35rem + 4px);
}
/* Hide empty upload strip until first photo or floor-plan PDF */
#rap_ai_panel #rap_card_photos .image-upload-container:not(:has(.image-field.has-image)):not(:has(.rap-review-pdf-cell)) {
    display: none;
}

/* Review photos slider — tight gap; allow vertical overflow so type menus can open above tiles */
#rap_card_photos .image-upload-container {
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 0;
    padding-top: 2px;
    scroll-snap-type: x mandatory;
}

#rap_card_photos .image-field,
#rap_card_photos .image-upload-container > .rap-review-pdf-cell {
    flex: 0 0 250px;
    width: 250px;
    scroll-snap-align: start;
    margin: 0;
}

#rap_card_photos .image-field > label {
    display: none;
}

#rap_card_photos .image-preview {
    margin-top: 0.1rem !important;
    width: 100%;
    height: 150px;
    position: relative;
    overflow: visible;
}

#rap_card_photos .image-preview img.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*
 * Captions: every slot keeps an input in the DOM (values survive reorder).
 * First/main slot: hidden — not shown or editable while it is first.
 * Slots 2+: visible line under the thumb — matches legacy “all but first have a caption”.
 */
#rap_card_photos .image-upload-container > .image-field:first-child .image-caption {
    display: none !important;
}
#rap_card_photos .image-upload-container > .image-field:not(:first-child) .image-caption {
    width: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0.25rem 0 !important;
    margin-top: 2px !important;
    font-size: 1rem !important;
    color: #333 !important;
    box-sizing: border-box;
    box-shadow: none !important;
    outline: none;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
}
#rap_card_photos .image-upload-container > .image-field:not(:first-child) .image-caption:focus,
#rap_card_photos .image-upload-container > .image-field:not(:first-child) .image-caption:focus-visible {
    border: 0 !important;
    box-shadow: none !important;
    outline: none;
    text-decoration: none;
}

/* Review-panel card spacing.
   margin-bottom is kept tight so the space *above* each section heading matches the
   space above Core facts. padding-bottom gives the space at the *end* of each section
   (between its content and the divider line). */
#rap_ai_panel .rap-preview-card {
    margin-bottom: 0.5rem;
    padding-bottom: 0.85rem;
}
/* Photos: no extra gap above its own heading (first section in the panel) */
#rap_ai_panel #rap_card_photos.rap-preview-card {
    margin-top: 0;
    padding-bottom: 0.55rem;
}
#rap_ai_panel #rap_card_photos.rap-preview-card:not(:has(.image-field.has-image)):not(:has(.rap-review-pdf-cell)) {
    padding-bottom: 0.28rem;
}
/* Title & description already had enough end space; keep its original tighter padding */
#rap_ai_panel #rap_card_title.rap-preview-card {
    padding-bottom: 0.28rem;
}
#rap_ai_panel #rap_card_photos .rap-preview-card__head {
    margin-bottom: calc(0.3rem + 3px);
}
#rap_ai_panel #rap_card_photos .rap-preview-card__hint {
    margin: 0 0 0.28rem;
}
#rap_ai_panel #rap_card_photos .rap-photos-card-hint {
    margin: 0.65rem 0 0;
}
#rap_ai_panel #rap_card_photos .rap-review-photos-upload {
    margin-bottom: calc(0.35rem + 4px) !important;
}
#rap_ai_panel #rap_card_photos:has(.image-field.has-image) .rap-review-photos-upload,
#rap_ai_panel #rap_card_photos:has(.rap-review-pdf-cell) .rap-review-photos-upload {
    margin-bottom: calc(0.55rem + 4px) !important;
}
#rap_ai_panel #rap_card_title .rap-preview-card__head {
    margin-bottom: 0.22rem;
}
#rap_ai_panel #rap_card_core .rap-preview-card__head {
    margin-top: 0;
    margin-bottom: 1.15rem;
}
/* Less empty depth under description before Core facts */
#rap_ai_panel #rap_card_title #rap_ai_description {
    min-height: 0;
    margin-bottom: 5px !important;
}
/* Contact & submit keeps its tighter end space (no large gap below the submit area). */
#rap_ai_panel #rap_card_contact.rap-preview-card {
    margin-top: 0;
    padding-bottom: 0.28rem;
}

/* Drag cursor only on the drag handle (preview area) */
#rap_card_photos .image-field[data-index]:not([data-index="0"]) .image-preview {
    cursor: grab;
}

#rap_card_photos .image-field[data-index]:not([data-index="0"]).is-dragging .image-preview {
    cursor: grabbing;
}

/* Media type: bottom-left text chip; menu opens above with checkmarks */
#rap_card_photos .image-preview .rap-asset-type-ui {
    position: absolute;
    left: 0;
    bottom: 0;
    right: auto;
    top: auto;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0;
    pointer-events: none;
    width: auto;
    max-width: calc(100% - 6px);
}
#rap_card_photos .image-preview .rap-asset-type-ui .rap-asset-type-trigger,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-trigger {
    pointer-events: auto;
    width: max-content;
    max-width: calc(100% - 2px);
    margin: 0;
    padding: 2px 6px;
    border: 0;
    border-radius: 0;
    background: rgba(45, 45, 45, 0.82);
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    font-weight: 600;
    font-style: normal;
    font-family: inherit;
    box-sizing: border-box;
    text-align: left;
    white-space: nowrap;
}
#rap_card_photos .image-preview .rap-asset-type-trigger:focus-visible,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 1px;
}
/* Type picker panel: simple list, all options, checkmark on current */
#rap_card_photos .image-preview .rap-asset-type-panel,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-panel {
    pointer-events: auto;
    width: max-content;
    min-width: 7.5rem;
    max-width: min(100vw - 24px, 14rem);
    margin-bottom: 2px;
    background: rgba(45, 45, 45, 0.96);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
}
#rap_card_photos .image-preview .rap-asset-type-panel[hidden],
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-panel[hidden] {
    display: none !important;
}
#rap_card_photos .image-preview .rap-asset-type-panel-scroll,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-panel-scroll {
    max-height: none;
    overflow: visible;
    flex: 0 0 auto;
}
#rap_card_photos .image-preview .rap-asset-type-panel-footer,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-panel-footer {
    display: none !important;
}
#rap_card_photos .image-preview .rap-asset-type-option,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.5rem;
    line-height: 1.25;
    border: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    font-size: 0.78rem;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
}
#rap_card_photos .image-preview .rap-asset-type-option__mark,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-option__mark {
    flex: 0 0 0.85rem;
    width: 0.85rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}
#rap_card_photos .image-preview .rap-asset-type-option__label,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-option__label {
    flex: 1 1 auto;
}
#rap_card_photos .image-preview .rap-asset-type-option--selected,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-option--selected {
    background: rgba(255, 255, 255, 0.14);
    font-weight: 600;
}
#rap_card_photos .image-preview .rap-asset-type-option:hover,
#rap_card_photos .image-preview .rap-asset-type-option:focus,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-option:hover,
#rap_card_photos .rap-asset-type-ui--pdf .rap-asset-type-option:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#rap_card_photos .rap-review-pdf-cell {
    position: relative;
    flex-shrink: 0;
}
#rap_card_photos .rap-review-pdf-thumb {
    position: relative;
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    background: #f7f7f7;
    box-sizing: border-box;
    overflow: visible;
}
/* Same corner remove control as photo thumbnails */
#rap_card_photos .rap-review-pdf-thumb > .image-overlay.rap-review-pdf-remove-overlay {
    position: absolute;
    top: 0;
    right: 6px;
    z-index: 8;
    pointer-events: auto;
}
#rap_card_photos .rap-review-pdf-stack {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.35rem 1.85rem;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 3px;
}
#rap_card_photos .rap-review-pdf-icon {
    font-size: 0.75rem;
    font-weight: 700;
    color: #c00;
    margin-bottom: 0.25rem;
}
#rap_card_photos .rap-review-pdf-name {
    font-size: 0.65rem;
    color: #333;
    text-align: center;
    word-break: break-word;
    line-height: 1.15;
    max-height: 3.2em;
    overflow: hidden;
}
#rap_card_photos .rap-asset-type-ui--pdf {
    position: absolute;
    left: 0;
    right: auto;
    bottom: 0;
    top: auto;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0;
    pointer-events: none;
    width: auto;
    max-width: calc(100% - 6px);
}

.rap-form-actions .rap-save-draft-btn {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #333;
    background: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
}
.submit-button.rap-submit-primary--blocked {
    cursor: pointer;
}
/* Review screen submit: lighter site red while incomplete; full #eb0c0c when ready (overrides theme / opacity wash) */
#register-form-overlay .rap-form-actions .rap-review-cta-row .submit-button.rap-submit-primary--blocked,
#modify-form-overlay .rap-form-actions .rap-review-cta-row .submit-button.rap-submit-primary--blocked {
    background-color: #ef5a5a !important;
    opacity: 1 !important;
    color: #fff !important;
    border: none !important;
}
#register-form-overlay .rap-form-actions .rap-review-cta-row .submit-button.rap-submit-primary--blocked:hover,
#modify-form-overlay .rap-form-actions .rap-review-cta-row .submit-button.rap-submit-primary--blocked:hover {
    background-color: #e04545 !important;
    color: #fff !important;
}
#register-form-overlay .rap-form-actions .rap-review-cta-row .submit-button:not(.rap-submit-primary--blocked),
#modify-form-overlay .rap-form-actions .rap-review-cta-row .submit-button:not(.rap-submit-primary--blocked) {
    background-color: #eb0c0c !important;
    opacity: 1 !important;
    color: #fff !important;
    border: none !important;
}
#register-form-overlay .rap-form-actions .rap-review-cta-row .submit-button:not(.rap-submit-primary--blocked):hover,
#modify-form-overlay .rap-form-actions .rap-review-cta-row .submit-button:not(.rap-submit-primary--blocked):hover {
    background-color: #c90a0a !important;
    color: #fff !important;
}
.rap-ai-feature-row .rap-ai-feature-label {
    font-weight: 500;
}

/* Steps */
.rap-form-step {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}
.rap-form-step:last-of-type {
    border-bottom: none;
}
.rap-form-step__title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}
.rap-form-step__hint {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

/* Core facts grid: label / value pairs */
.rap-form-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    align-items: center;
}
.rap-form-grid label {
    margin: 0;
}
.rap-form-grid .rap-ai-field {
    margin: 0;
    padding: 0.4rem 0.5rem;
    max-width: 100%;
}
.rap-form-grid--core {
    grid-template-columns: 100px 1fr;
}

/* Fields: AI-inferred vs confirmed (optional visual distinction) */
.rap-ai-field {
    border: 1px solid #ced4da;
    border-radius: 4px;
}
.rap-ai-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* Features: flat comma-separated list + add (+) dropdown (no card box) */
#rap_card_features .rap-preview-card__body {
    padding-left: 0;
    padding-right: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
#rap_card_features #rap_features_component {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.rap-features-component {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 0.15rem;
    width: 100%;
    text-align: left;
}
.rap-feature-section {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1ch;
    width: 100%;
}
.rap-feature-section__label {
    font-size: 1.25rem;
    letter-spacing: 0;
    text-transform: none;
    color: #333;
    font-weight: 400;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    display: inline;
    flex: 0 0 auto;
}
.rap-feature-section:has(.rap-feature-item) .rap-feature-section__label {
    font-weight: 400;
}
.rap-feature-section__chips {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    border: 0;
    background: transparent;
    box-shadow: none;
}
/* One flex row so + stays after the last comma, inline with feature text (wraps only when needed) */
.rap-feature-items {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    vertical-align: top;
}
.rap-feature-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    vertical-align: baseline;
}
.rap-feature-item.is-ai {
    opacity: 1;
}
/* Derived API/AI feature chips: pale fill (match derived inputs), no underline */
#rap_ai_panel #rap_card_features .rap-feature-item.is-derived-api .rap-feature-item__label,
#rap_ai_panel #rap_card_features .rap-feature-item.is-derived-ai .rap-feature-item__label {
    background: var(--rap-derived-ai-bg, #f3f1e7) !important;
    background-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    text-decoration: none !important;
    padding: 0.06em 0.32em 0.05em;
    border-radius: 3px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
/* Feature text: larger + bold; × sits flush after the last letter */
.rap-feature-item__label {
    margin: 0;
    padding: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
#rap_card_features .rap-feature-item__label {
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
#rap_card_features .rap-feature-remove {
    display: inline-block;
    border: 0 !important;
    background: transparent !important;
    color: #555 !important;
    -webkit-text-fill-color: #555;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    padding: 0 !important;
    margin: 0 1ch 0 0 !important;
    min-width: 0;
    cursor: pointer;
    position: relative;
    top: calc(-0.06em - 5px);
    vertical-align: baseline;
}
#rap_card_features .rap-feature-remove:hover {
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
/* Commas separate feature entries: Terrace×, Private balcony×, */
.rap-feature-comma {
    display: inline-block;
    width: 0;
    overflow: visible;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    color: #333 !important;
    -webkit-text-fill-color: #333;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    vertical-align: baseline;
}
#rap_card_features .rap-feature-comma {
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
.rap-feature-add-wrap {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    flex: 0 0 auto;
    vertical-align: baseline;
    margin: 0;
    padding: 0;
}
.rap-feature-add-inline {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0;
}
.rap-feature-add-inline--global {
    margin-top: 0;
    flex: 1 1 16rem;
}
.rap-feature-more-wrap {
    margin-top: 0.35rem;
    width: 100%;
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.rap-feature-more-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}
.rap-feature-add-input {
    display: inline-block !important;
    min-width: 10.5rem;
    max-width: 16rem;
    width: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 0 0 0.18rem !important;
    font-size: 1.25rem !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
.rap-feature-add-input--global {
    min-width: 16rem;
    max-width: 100%;
    font-size: 1.25rem !important;
}
.rap-feature-add-input::placeholder {
    color: #888;
    -webkit-text-fill-color: #888;
    opacity: 1;
    font-weight: 400;
}
/* Theme overlay often sets buttons to block/100% width — keep + inline after the comma */
#rap_card_features .rap-feature-add-btn {
    display: inline-block !important;
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto;
    align-self: baseline;
    border: 0 !important;
    background: transparent !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
    /* Slightly above feature size (1.05rem); align visual baseline with “Terrace” */
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1;
    padding: 0 0.12rem;
    margin: 0;
    min-width: 0;
    cursor: pointer;
    border-radius: 0;
    vertical-align: baseline;
    position: relative;
    top: 0.1em;
}
.rap-feature-add-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.rap-feature-add-btn:not(:disabled):hover {
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
.rap-feature-dropdown {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 40;
    min-width: 17rem;
    max-width: 26rem;
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid #c5cdd6;
    border-radius: 8px;
    background: #fff !important;
    color: #333 !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    padding: 0.35rem;
}
.rap-feature-dropdown.is-inline {
    top: calc(100% + 0.08rem);
    left: 0;
    min-width: 13rem;
    max-width: 18rem;
    padding: 0.08rem;
    border-radius: 6px;
}
.rap-feature-dropdown--global {
    min-width: 18rem;
    max-width: 24rem;
    border: none !important;
}
.rap-feature-result {
    display: block;
    width: 100%;
    text-align: left;
    border: 0 !important;
    border-radius: 6px;
    background: #fff !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
    padding: 0.24rem 0.45rem;
    font-size: 0.86rem;
    line-height: 1.2;
    cursor: pointer;
    margin: 0 !important;
}
.rap-feature-result:hover {
    background: #f0f3f7 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
.rap-feature-result.is-custom-add {
    font-style: italic;
}
.rap-feature-item__label--custom {
    font-style: italic;
}
.rap-form-features-extra {
    display: none !important;
}

/* Listing details: one field per row */
.rap-form-step label:not(.rap-feature-chip):not(.cat-option) {
    display: block;
    margin-top: 0.6rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}
.rap-form-step input[type="text"],
.rap-form-step input[type="email"],
.rap-form-step input[type="number"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.5rem;
}
.rap-form-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-weight: normal;
}
.rap-form-terms input[type="checkbox"] {
    margin: 0.2rem 0 0;
}

/* Actions: Looks right + submit */
.rap-form-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}
/* Review screen: tight gap after Accept terms */
#rap_ai_panel .rap-form-actions {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    padding-bottom: 10px;
    margin-bottom: 0;
}
.rap-form-looks-right-copy {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #444;
}
#rap_ai_panel .rap-form-actions .rap-form-looks-right-copy {
    margin: 0;
}
.rap-form-actions .button-container {
    margin-top: 0.5rem;
    width: 100%;
    min-width: 0;
    display: block;
}
#rap_ai_panel .rap-form-actions .button-container {
    margin-top: 0;
}
#rap_ai_panel .rap-form-actions .rap-review-cta-row {
    margin-top: 0;
}
.rap-clear-form-wrap {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin: 0.5rem 0 5px;
    padding: 0;
    text-align: left;
    width: 100%;
    clear: both;
}
#register-form-overlay .rap-clear-form-wrap {
    text-align: left;
    justify-content: flex-start;
}
#register-form-overlay.rap-screen1-compact .rap-clear-form-wrap--screen1 {
    margin-top: 0.35rem;
    margin-bottom: 5px;
}
#rap_ai_panel > .rap-clear-form-wrap--screen2 {
    margin-top: 0.35rem;
    margin-bottom: 5px;
    padding: 0;
}
a.rap-clear-form-link,
button.rap-clear-form-link {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    color: #333;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    border-radius: 0;
}
#register-form-overlay a.rap-clear-form-link,
#modify-form-overlay a.rap-clear-form-link {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    text-align: left !important;
    color: #333 !important;
}
#register-form-overlay a.rap-clear-form-link:hover,
#register-form-overlay a.rap-clear-form-link:focus-visible,
#modify-form-overlay a.rap-clear-form-link:hover,
#modify-form-overlay a.rap-clear-form-link:focus-visible {
    color: #888 !important;
    background: none;
    text-decoration: underline;
}
#register-form-overlay button.rap-clear-form-link:hover,
#register-form-overlay button.rap-clear-form-link:focus-visible,
#modify-form-overlay button.rap-clear-form-link:hover,
#modify-form-overlay button.rap-clear-form-link:focus-visible {
    color: #888 !important;
    background: none;
    text-decoration: underline;
}
.rap-clear-form-link[hidden] {
    display: none;
}
/* Compact register/modify confirmation modals (Clear form?, Go back?, etc.) */
@media (min-width: 601px) {
    #modal-box:not(.rap-submit-modal-box):has(.rap-form-prompt-modal) {
        max-width: 520px;
    }
}
#modal-message .rap-form-prompt-modal {
    padding: 14px 14px 15px;
    box-sizing: border-box;
    max-width: 100%;
}
#modal-message .rap-form-prompt-modal__title {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 6px;
    color: #333;
}
#modal-message .rap-form-prompt-modal__body {
    margin: 0 0 12px;
    line-height: 1.45;
    font-size: 1rem;
    color: #333;
}
#modal-message .rap-form-prompt-modal__title + .rap-form-prompt-modal__body {
    margin-top: 0;
}
#modal-message .rap-form-prompt-modal__title + .rap-modal-btn-row,
#modal-message .rap-form-prompt-modal__body + .rap-modal-btn-row {
    margin-top: 6px;
}
/* Simple alert modals (upload limits, brochure-on-screen-2 notice, etc.) */
#modal-box:not(.rap-submit-modal-box) #modal-message:has(.modal-message-line) {
    padding-bottom: 1.15rem;
}
#modal-box:not(.rap-submit-modal-box) #modal-message:has(.modal-message-line) .modal-message-line:last-child {
    margin-bottom: 0.25rem;
}
#modal-box:not(.rap-submit-modal-box) #modal-message:has(.rap-form-prompt-modal) {
    padding-bottom: 0;
}
.rap-modal-btn-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}
.rap-modal-btn-row__btn {
    flex: 1 1 8.5rem;
    min-width: min(100%, 8.5rem);
    padding: 10px 16px;
    box-sizing: border-box;
}
@media (min-width: 601px) {
    #modal-message .rap-form-prompt-modal .rap-modal-btn-row {
        flex-wrap: nowrap;
    }
    #modal-message .rap-form-prompt-modal .rap-modal-btn-row__btn {
        flex: 1 1 0;
        min-width: 0;
        white-space: nowrap;
    }
}
.rap-modal-btn-row--single .rap-modal-btn-row__btn {
    flex: 1 1 auto;
    min-width: 0;
}
#rap_ai_panel .rap-form-actions .message-container {
    margin: 0;
    padding: 0;
    min-height: 0;
}
.rap-form-actions .submit-button {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 100%;
    max-width: 320px;
}
.rap-form-actions .submit-button:hover {
    background: #222;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* -------------------------------------------------------------------------
   Screen 2 (Check your listing): pill segmented controls + aligned columns
   ------------------------------------------------------------------------- */
#rap_ai_panel {
    --rap-review-label-col: 14rem;
    /* Postcode / Price: narrower than legal/contact so values sit closer; labels stay left-aligned */
    --rap-core-label-col: 9.25rem;
}

/* Listing type: rounded group, selected = white on dark */
#rap_ai_panel #rap_card_core .rap-core-transaction-row {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: auto !important;
    max-width: 100% !important;
    border: 1px solid #333 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar .rap-core-transaction-row {
    margin-bottom: 0 !important;
}
#rap_ai_panel #rap_card_core .rap-core-transaction-row .rap-core-radio-label {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: #333 !important;
    background: transparent !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    padding: 0.45rem 1rem !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    justify-content: center !important;
}
/* Dividers between segments (News may be hidden) */
#rap_ai_panel #rap_card_core .rap-core-transaction-row > * + * {
    border-left: 1px solid #c8c8c8 !important;
}

/* Auction: standalone pill in listing toolbar (after New development) — RAP non-LDS */
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar .rap-auction-standalone-wrap {
    flex: 0 0 auto !important;
    margin-top: 0 !important;
}
#rap_ai_panel #rap_card_core .rap-core-listing-toolbar .rap-auction-standalone-wrap[hidden] {
    display: none !important;
}

/* LDS: tenure · tenancies · auction · tender under price (wrap when needed) */
#rap_ai_panel #rap_card_core .rap-deal-terms-row,
#rap_ai_panel #rap_card_core .rap-sale-method-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.75rem;
    width: 100%;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack--deal-terms,
#rap_ai_panel #rap_card_core .rap-core-field-stack--sale-method {
    margin-top: 0.35rem;
}
#rap_ai_panel #rap_card_core .rap-deal-terms-group {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
}
#rap_ai_panel #rap_card_core .rap-deal-terms-group .rap-seg {
    margin: 0;
}
#rap_ai_panel #rap_card_core .rap-auction-standalone-seg .rap-seg-btn--auction-toggle.is-active,
#rap_ai_panel #rap_card_core .rap-tender-standalone-seg .rap-seg-btn--tender-toggle.is-active,
#rap_ai_panel #rap_card_core .rap-tenancies-seg .rap-seg-btn--existing-tenancies-toggle.is-active {
    background: #333 !important;
    color: #fff !important;
    font-weight: 600 !important;
    -webkit-text-fill-color: #fff !important;
}
#rap_ai_panel #rap_card_core .rap-auction-standalone-seg .rap-seg-btn--auction-toggle:hover:not(.is-active),
#rap_ai_panel #rap_card_core .rap-tender-standalone-seg .rap-seg-btn--tender-toggle:hover:not(.is-active),
#rap_ai_panel #rap_card_core .rap-tenancies-seg .rap-seg-btn--existing-tenancies-toggle:hover:not(.is-active) {
    background: #e4e4e4 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333 !important;
}
#rap_ai_panel #rap_card_core .rap-auction-standalone-seg .rap-seg-btn--auction-toggle.is-active:hover,
#rap_ai_panel #rap_card_core .rap-tender-standalone-seg .rap-seg-btn--tender-toggle.is-active:hover,
#rap_ai_panel #rap_card_core .rap-tenancies-seg .rap-seg-btn--existing-tenancies-toggle.is-active:hover {
    background: #333 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
#rap_ai_panel #rap_card_core #rap_auction_date_stack[hidden],
#rap_ai_panel #rap_card_core #rap_tender_deadline_stack[hidden] {
    display: none !important;
}
/* LDS: no Legal details card — lease fields live under Core facts */
#rap_ai_panel #rap_card_legal[data-lds-legal-relocated="1"] {
    display: none !important;
}
/* Match Legal details lease/money rows inside Core facts */
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--legal-lease,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--legal-money {
    display: grid !important;
    /* Wider than Price/Postcode labels so "Service charge (pa)" does not crowd the value */
    grid-template-columns: minmax(13.5rem, max-content) 1fr;
    column-gap: 1.75rem;
    row-gap: 0;
    align-items: baseline !important;
    width: 100%;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--legal-lease .rap-legal-inline-prefix,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--legal-money .rap-legal-inline-prefix {
    grid-column: 1;
    font-size: 1.25rem;
    font-weight: 400 !important;
    color: #333;
    line-height: 1.2;
    margin: 0;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--legal-lease .rap-legal-lease-field {
    grid-column: 2;
    display: inline-flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0.28ch;
    min-width: 0;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--legal-money .rap-legal-money-amount-group {
    grid-column: 2;
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.4ch;
    min-width: 0;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--legal-money .rap-legal-money-group {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0.5ch;
    flex: 0 0 auto;
    min-width: 0;
}
#rap_ai_panel #rap_card_core .rap-legal-money-symbol,
#rap_ai_panel #rap_card_core .rap-legal-lease-suffix {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    flex: 0 0 auto;
}
#rap_ai_panel #rap_card_core .rap-legal-lease-field input:placeholder-shown + .rap-legal-lease-suffix {
    display: none;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--legal-lease input.rap-legal-stack-input,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--legal-money input.rap-legal-stack-input {
    width: auto !important;
    max-width: 16ch !important;
    min-width: 0 !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
#rap_ai_panel #rap_card_core #rap_legal_ground_rent_to_wrap[hidden],
#rap_ai_panel #rap_card_core #rap_legal_service_charge_to_wrap[hidden] {
    display: none !important;
}
#rap_ai_panel #rap_card_core .rap-sale-date-row .rap-sale-date-input {
    grid-column: 2;
    justify-self: start;
    font-size: 1.25rem !important;
    font-weight: 400 !important;
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    line-height: 1.2 !important;
    field-sizing: content;
    accent-color: #c4c4c4;
    color-scheme: light;
    cursor: pointer;
}
#rap_ai_panel #rap_card_core .rap-sale-date-row .rap-sale-date-input:valid {
    font-weight: 700 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333 !important;
}
#rap_ai_panel #rap_card_core .rap-sale-date-row .rap-sale-date-input:focus,
#rap_ai_panel #rap_card_core .rap-sale-date-row .rap-sale-date-input:focus-visible {
    outline: none;
    background: transparent !important;
}
#rap_ai_panel #rap_card_core .rap-core-transaction-row .rap-core-radio-label:has(input[type="radio"]:checked) {
    background: #333 !important;
    color: #fff !important;
    font-weight: 600 !important;
}
#rap_ai_panel #rap_card_core .rap-core-transaction-row .rap-core-radio-label:hover:not(:has(input[type="radio"]:checked)) {
    background: #e4e4e4 !important;
    color: #333 !important;
}
#rap_ai_panel #rap_card_core .rap-core-transaction-row .rap-core-radio-label:has(input[type="radio"]:checked):hover {
    background: #333 !important;
    color: #fff !important;
}
#rap_ai_panel #rap_card_core .rap-core-transaction-row .rap-core-radio-label:has(input[type="radio"]:checked).rap-derived-seg--ai,
#rap_ai_panel #rap_card_core .rap-core-transaction-row .rap-core-radio-label:has(input[type="radio"]:checked).rap-derived-seg--api {
    color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    -webkit-text-fill-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
}
#rap_ai_panel #rap_card_core .rap-core-transaction-row .rap-core-radio-label:has(input[type="radio"]:checked).rap-derived-seg--ai:hover,
#rap_ai_panel #rap_card_core .rap-core-transaction-row .rap-core-radio-label:has(input[type="radio"]:checked).rap-derived-seg--api:hover {
    color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    -webkit-text-fill-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
}

/* Segmented buttons: pill shell (core, legal, utilities, additional, existing/proposed — same treatment) */
#rap_ai_panel #rap_card_core .rap-seg,
#rap_ai_panel #rap_card_legal .rap-seg,
#rap_ai_panel #rap_card_utilities .rap-seg,
#rap_ai_panel #rap_card_additional_details .rap-seg,
#rap_ai_panel #rap_card_development .rap-seg,
#rap_ai_panel #rap_card_existing .rap-seg,
#rap_ai_panel #rap_card_proposed .rap-seg {
    border: 1px solid #333 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    max-width: 100% !important;
}
#rap_ai_panel #rap_card_core .rap-seg .rap-seg-btn,
#rap_ai_panel #rap_card_legal .rap-seg .rap-seg-btn,
#rap_ai_panel #rap_card_utilities .rap-seg .rap-seg-btn,
#rap_ai_panel #rap_card_additional_details .rap-seg .rap-seg-btn,
#rap_ai_panel #rap_card_development .rap-seg .rap-seg-btn,
#rap_ai_panel #rap_card_existing .rap-seg .rap-seg-btn,
#rap_ai_panel #rap_card_proposed .rap-seg .rap-seg-btn {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: #333 !important;
    background: transparent !important;
    -webkit-text-fill-color: #333 !important;
    border-right: 1px solid #c8c8c8 !important;
    padding: 0.45rem 0.9rem !important;
    min-height: 0 !important;
    line-height: 1.25 !important;
    flex-shrink: 0;
}
#rap_ai_panel #rap_card_core .rap-seg .rap-seg-btn:last-child,
#rap_ai_panel #rap_card_legal .rap-seg .rap-seg-btn:last-child,
#rap_ai_panel #rap_card_utilities .rap-seg .rap-seg-btn:last-child,
#rap_ai_panel #rap_card_additional_details .rap-seg .rap-seg-btn:last-child,
#rap_ai_panel #rap_card_development .rap-seg .rap-seg-btn:last-child,
#rap_ai_panel #rap_card_existing .rap-seg .rap-seg-btn:last-child,
#rap_ai_panel #rap_card_proposed .rap-seg .rap-seg-btn:last-child {
    border-right: 0 !important;
}
#rap_ai_panel #rap_card_core .rap-seg .rap-seg-btn.is-active,
#rap_ai_panel #rap_card_legal .rap-seg .rap-seg-btn.is-active,
#rap_ai_panel #rap_card_utilities .rap-seg .rap-seg-btn.is-active,
#rap_ai_panel #rap_card_additional_details .rap-seg .rap-seg-btn.is-active,
#rap_ai_panel #rap_card_development .rap-seg .rap-seg-btn.is-active,
#rap_ai_panel #rap_card_existing .rap-seg .rap-seg-btn.is-active,
#rap_ai_panel #rap_card_proposed .rap-seg .rap-seg-btn.is-active {
    background: #333 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-weight: 600 !important;
}
#rap_ai_panel #rap_card_core .rap-seg .rap-seg-btn:hover:not(.is-active),
#rap_ai_panel #rap_card_legal .rap-seg .rap-seg-btn:hover:not(.is-active),
#rap_ai_panel #rap_card_utilities .rap-seg .rap-seg-btn:hover:not(.is-active),
#rap_ai_panel #rap_card_additional_details .rap-seg .rap-seg-btn:hover:not(.is-active),
#rap_ai_panel #rap_card_development .rap-seg .rap-seg-btn:hover:not(.is-active),
#rap_ai_panel #rap_card_existing .rap-seg .rap-seg-btn:hover:not(.is-active),
#rap_ai_panel #rap_card_proposed .rap-seg .rap-seg-btn:hover:not(.is-active) {
    background: #e4e4e4 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333 !important;
}
#rap_ai_panel #rap_card_core .rap-seg .rap-seg-btn.is-active:hover,
#rap_ai_panel #rap_card_legal .rap-seg .rap-seg-btn.is-active:hover,
#rap_ai_panel #rap_card_utilities .rap-seg .rap-seg-btn.is-active:hover,
#rap_ai_panel #rap_card_additional_details .rap-seg .rap-seg-btn.is-active:hover,
#rap_ai_panel #rap_card_development .rap-seg .rap-seg-btn.is-active:hover,
#rap_ai_panel #rap_card_existing .rap-seg .rap-seg-btn.is-active:hover,
#rap_ai_panel #rap_card_proposed .rap-seg .rap-seg-btn.is-active:hover {
    background: #333 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* Split segmented controls (multi-select chip groups only): when a row of chips
   overflows, JS moves the overflow into additional `.rap-seg` shells stacked
   vertically inside `.rap-seg-flow`, so each line reads as its own pill. */
#rap_ai_panel .rap-seg-flow {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

/* Derived active segments: keep dark pill; AI-selection text = dull yellow/grey */
#rap_ai_panel #rap_card_core .rap-seg .rap-seg-btn.is-active.rap-derived-seg--api,
#rap_ai_panel #rap_card_core .rap-seg .rap-seg-btn.is-active.rap-derived-seg--ai,
#rap_ai_panel #rap_card_legal .rap-seg .rap-seg-btn.is-active.rap-derived-seg--api,
#rap_ai_panel #rap_card_legal .rap-seg .rap-seg-btn.is-active.rap-derived-seg--ai,
#rap_ai_panel #rap_card_utilities .rap-seg .rap-seg-btn.is-active.rap-derived-seg--api,
#rap_ai_panel #rap_card_utilities .rap-seg .rap-seg-btn.is-active.rap-derived-seg--ai,
#rap_ai_panel #rap_card_additional_details .rap-seg .rap-seg-btn.is-active.rap-derived-seg--api,
#rap_ai_panel #rap_card_additional_details .rap-seg .rap-seg-btn.is-active.rap-derived-seg--ai,
#rap_ai_panel #rap_card_development .rap-seg .rap-seg-btn.is-active.rap-derived-seg--api,
#rap_ai_panel #rap_card_development .rap-seg .rap-seg-btn.is-active.rap-derived-seg--ai,
#rap_ai_panel #rap_card_legal .rap-seg-btn[data-target="rap_ai_council_tax_band"].is-active.rap-seg-btn--ctv-api-chimnie,
#rap_ai_panel #rap_card_legal .rap-seg-btn[data-target="rap_ai_council_tax_band"].is-active.rap-seg-btn--ctv-api-local {
    box-shadow: none !important;
    color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    -webkit-text-fill-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
}
#rap_ai_panel #rap_card_core .rap-seg .rap-seg-btn.is-active.rap-derived-seg--api:hover,
#rap_ai_panel #rap_card_core .rap-seg .rap-seg-btn.is-active.rap-derived-seg--ai:hover,
#rap_ai_panel #rap_card_legal .rap-seg .rap-seg-btn.is-active.rap-derived-seg--api:hover,
#rap_ai_panel #rap_card_legal .rap-seg .rap-seg-btn.is-active.rap-derived-seg--ai:hover,
#rap_ai_panel #rap_card_utilities .rap-seg .rap-seg-btn.is-active.rap-derived-seg--api:hover,
#rap_ai_panel #rap_card_utilities .rap-seg .rap-seg-btn.is-active.rap-derived-seg--ai:hover,
#rap_ai_panel #rap_card_additional_details .rap-seg .rap-seg-btn.is-active.rap-derived-seg--api:hover,
#rap_ai_panel #rap_card_additional_details .rap-seg .rap-seg-btn.is-active.rap-derived-seg--ai:hover,
#rap_ai_panel #rap_card_development .rap-seg .rap-seg-btn.is-active.rap-derived-seg--api:hover,
#rap_ai_panel #rap_card_development .rap-seg .rap-seg-btn.is-active.rap-derived-seg--ai:hover,
#rap_ai_panel #rap_card_legal .rap-seg-btn[data-target="rap_ai_council_tax_band"].is-active.rap-seg-btn--ctv-api-chimnie:hover,
#rap_ai_panel #rap_card_legal .rap-seg-btn[data-target="rap_ai_council_tax_band"].is-active.rap-seg-btn--ctv-api-local:hover {
    color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    -webkit-text-fill-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
}
/* Derived text/number/select: pale fill only (no underline); exclude hidden segment fields */
#rap_ai_panel input:not([type="hidden"]).rap-derived-value--api,
#rap_ai_panel textarea.rap-derived-value--api,
#rap_ai_panel select.rap-derived-value--api {
    background: var(--rap-derived-ai-bg, #f3f1e7) !important;
    background-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    text-decoration: none !important;
}
#rap_ai_panel input:not([type="hidden"]).rap-derived-value--api:focus,
#rap_ai_panel input:not([type="hidden"]).rap-derived-value--api:focus-visible,
#rap_ai_panel textarea.rap-derived-value--api:focus,
#rap_ai_panel textarea.rap-derived-value--api:focus-visible,
#rap_ai_panel select.rap-derived-value--api:focus,
#rap_ai_panel select.rap-derived-value--api:focus-visible {
    background: var(--rap-derived-ai-bg, #f3f1e7) !important;
    background-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    text-decoration: none !important;
}
#rap_ai_panel input:not([type="hidden"]).rap-derived-value--ai,
#rap_ai_panel textarea.rap-derived-value--ai,
#rap_ai_panel select.rap-derived-value--ai {
    background: var(--rap-derived-ai-bg, #f3f1e7) !important;
    background-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    text-decoration: none !important;
}
#rap_ai_panel input:not([type="hidden"]).rap-derived-value--ai:focus,
#rap_ai_panel input:not([type="hidden"]).rap-derived-value--ai:focus-visible,
#rap_ai_panel textarea.rap-derived-value--ai:focus,
#rap_ai_panel textarea.rap-derived-value--ai:focus-visible,
#rap_ai_panel select.rap-derived-value--ai:focus,
#rap_ai_panel select.rap-derived-value--ai:focus-visible {
    background: var(--rap-derived-ai-bg, #f3f1e7) !important;
    background-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    text-decoration: none !important;
}

/*
 * Inline core/legal/contact fields use #rap_ai_panel #rap_card_* … background: transparent !important
 * (higher specificity than the block above). Match that chain + derived class so the pale fill shows.
 */
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--uprn-inline .rap-uprn-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-postcode-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bedrooms-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bathrooms-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_core .rap-preview-card__body .rap-core-field-stack__value .rap-price-sterling input.rap-price-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price .rap-price-sterling input.rap-price-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_legal .rap-preview-card__body .rap-core-field-stack__value input.rap-legal-stack-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_legal .rap-rent-date-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_legal .rap-rent-deposit-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_legal .rap-rent-tenancy-input:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_contact .rap-preview-card__body .rap-contact-inline-input[type="text"]:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_contact .rap-preview-card__body .rap-contact-inline-input[type="email"]:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_title #rap_ai_title:is(.rap-derived-value--api, .rap-derived-value--ai),
#rap_ai_panel #rap_card_title #rap_ai_description:is(.rap-derived-value--api, .rap-derived-value--ai) {
    background: var(--rap-derived-ai-bg, #f3f1e7) !important;
    background-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    text-decoration: none !important;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--uprn-inline .rap-uprn-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-postcode-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bedrooms-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_core .rap-preview-card__body .rap-core-field-stack__value input.rap-bathrooms-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_core .rap-preview-card__body .rap-core-field-stack__value .rap-price-sterling input.rap-price-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price .rap-price-sterling input.rap-price-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_legal .rap-preview-card__body .rap-core-field-stack__value input.rap-legal-stack-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_legal .rap-rent-date-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_legal .rap-rent-deposit-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_legal .rap-rent-tenancy-input:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_contact .rap-preview-card__body .rap-contact-inline-input[type="text"]:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_contact .rap-preview-card__body .rap-contact-inline-input[type="email"]:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_title #rap_ai_title:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible),
#rap_ai_panel #rap_card_title #rap_ai_description:is(.rap-derived-value--api, .rap-derived-value--ai):is(:focus, :focus-visible) {
    background: var(--rap-derived-ai-bg, #f3f1e7) !important;
    background-color: var(--rap-derived-ai-bg, #f3f1e7) !important;
    text-decoration: none !important;
}

/* Chrome / Safari autofill overrides our background — paint fill via inset shadow */
#rap_ai_panel input:not([type="hidden"]):is(.rap-derived-value--api, .rap-derived-value--ai):-webkit-autofill,
#rap_ai_panel input:not([type="hidden"]):is(.rap-derived-value--api, .rap-derived-value--ai):-webkit-autofill:hover,
#rap_ai_panel textarea:is(.rap-derived-value--api, .rap-derived-value--ai):-webkit-autofill,
#rap_ai_panel select:is(.rap-derived-value--api, .rap-derived-value--ai):-webkit-autofill {
    -webkit-text-fill-color: #333 !important;
    -webkit-box-shadow: 0 0 0 1000px var(--rap-derived-ai-bg, #f3f1e7) inset !important;
    box-shadow: 0 0 0 1000px var(--rap-derived-ai-bg, #f3f1e7) inset !important;
}

/* New development: single segment toggle — match height of House/Flat and Auction pills */
#rap_ai_panel #rap_card_core .rap-seg--new-development {
    display: inline-flex !important;
    align-items: stretch !important;
    align-self: center;
    min-height: 0;
}
#rap_ai_panel #rap_card_core .rap-seg--new-development .rap-seg-single-label {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.45rem 0.9rem !important;
    cursor: pointer;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    color: #333;
    user-select: none;
    gap: 0.35rem;
    box-sizing: border-box;
    min-height: 100%;
    align-self: stretch;
}
#rap_ai_panel #rap_card_core .rap-seg--new-development .rap-seg-single-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}
#rap_ai_panel #rap_card_core .rap-seg--new-development:has(input[type="checkbox"]:checked) {
    background: #333 !important;
}
#rap_ai_panel #rap_card_core .rap-seg--new-development:has(input[type="checkbox"]:checked) .rap-seg-single-label,
#rap_ai_panel #rap_card_core .rap-seg--new-development:has(input[type="checkbox"]:checked) .rap-seg-single-text {
    color: #fff !important;
    font-weight: 600 !important;
}

/* Core: Bedrooms / Bathrooms / Postcode / Price value columns (shared label width) */
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--postcode,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--bedrooms,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--bathrooms {
    display: grid !important;
    grid-template-columns: var(--rap-core-label-col) 1fr;
    column-gap: 0.15rem;
    row-gap: 0.35rem;
    align-items: baseline !important;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--postcode .rap-core-inline-prefix,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--bedrooms .rap-core-inline-prefix,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--bathrooms .rap-core-inline-prefix {
    grid-column: 1;
    text-align: left;
    justify-self: start;
    box-sizing: border-box;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--postcode .rap-postcode-input,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--bedrooms .rap-bedrooms-input,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--bathrooms .rap-bathrooms-input {
    grid-column: 2;
}
#rap_ai_panel #rap_card_core .rap-bedrooms-input::placeholder,
#rap_ai_panel #rap_card_core .rap-bathrooms-input::placeholder {
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}
/* Internal area: same flex pattern as Price (amount group + segment) so m² lines up with Fixed */
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center !important;
    gap: 0.35rem 0.35rem;
    width: 100%;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline .rap-internal-area-amount-group {
    display: grid !important;
    grid-template-columns: var(--rap-core-label-col) auto;
    column-gap: 0.15rem;
    align-items: center;
    align-self: center;
    flex: 0 1 auto;
    min-width: 0;
    /* Match Price row width so unit pills start on the same x as Fixed / PCM */
    width: calc(var(--rap-core-label-col) + 0.15rem + 15.5ch);
    max-width: 100%;
    box-sizing: border-box;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline .rap-core-inline-prefix {
    grid-column: 1;
    text-align: left;
    justify-self: start;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input {
    grid-column: 2;
    width: auto;
    max-width: 9.5rem;
    min-width: 2ch;
    field-sizing: content;
    justify-self: start;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    line-height: 1.2 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input:placeholder-shown {
    min-width: min(100%, 18ch);
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline .rap-core-unit-seg--inline {
    flex: 0 1 auto;
    min-width: 0;
    align-self: auto;
}
/* m²/sq ft + PCM/PW: match Completion segmented control height (Development card). */
#rap_ai_panel #rap_card_core .rap-core-unit-seg--inline .rap-seg-btn,
#rap_ai_panel #rap_card_core .rap-price-rent-seg .rap-seg-btn {
    padding: 0.45rem 0.9rem !important;
    line-height: 1.25 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    min-height: 0 !important;
    height: auto !important;
    align-items: center !important;
}
/* Site area: four units — slightly tighter so sq ft / m² / acres / hectares fit */
#rap_ai_panel #rap_card_core .rap-core-unit-seg--site .rap-seg-btn {
    padding: 0.45rem 0.65rem !important;
    font-size: 0.88rem !important;
}
/* UPRN: align with bedrooms row (label column + field); placeholder matches bedroom style */
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--uprn-inline {
    display: grid !important;
    grid-template-columns: var(--rap-core-label-col) 1fr;
    column-gap: 0.15rem;
    row-gap: 0.35rem;
    align-items: baseline !important;
    width: 100%;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--uprn-inline .rap-core-inline-prefix {
    grid-column: 1;
    text-align: left;
    justify-self: start;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--uprn-inline .rap-uprn-input {
    grid-column: 2;
    width: auto !important;
    max-width: 22ch !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    line-height: 1.2 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--uprn-inline .rap-uprn-input::placeholder,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline .rap-internal-area-input::placeholder {
    font-weight: 400;
    color: #888;
    opacity: 1;
    -webkit-text-fill-color: #888;
}
/* Price: amount + sale/rent segments on one row (PCM/PW only when To rent — JS sets [hidden]) */
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center !important;
    gap: 0.35rem 0.35rem;
}
/* Same label width as postcode row so £ lines up with the postcode field */
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price .rap-price-amount-group {
    display: grid !important;
    grid-template-columns: var(--rap-core-label-col) auto;
    column-gap: 0.15rem;
    align-items: baseline;
    flex: 0 1 auto;
    min-width: 0;
    /* Shared track with internal-area row so m² / sq ft align with Fixed */
    width: calc(var(--rap-core-label-col) + 0.15rem + 15.5ch);
    max-width: 100%;
    box-sizing: border-box;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price .rap-core-inline-prefix {
    grid-column: 1;
    flex: unset !important;
    width: auto !important;
    max-width: none !important;
    text-align: left;
    justify-self: start;
    box-sizing: border-box;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price .rap-price-sterling {
    grid-column: 2;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price .rap-price-sale-seg,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price .rap-price-rent-seg {
    flex: 0 1 auto;
    min-width: 0;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price .rap-price-rent-seg:not([hidden]) {
    margin-inline-start: 0.6rem;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price .rap-price-rent-seg[hidden],
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price .rap-price-sale-seg[hidden] {
    display: none !important;
}

/* Core facts: label weight — always normal (review screen) */
#rap_ai_panel #rap_card_core .rap-core-inline-prefix {
    font-weight: 400 !important;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--postcode:has(.rap-postcode-input:not(:placeholder-shown)) .rap-core-inline-prefix,
#rap_ai_panel #rap_card_core .rap-price-amount-group:has(input.rap-price-input:not(:placeholder-shown)) .rap-core-inline-prefix {
    font-weight: 400 !important;
}

/* Contact: label weight always normal + space before terms */
#rap_ai_panel #rap_card_contact .rap-contact-inline-prefix {
    font-weight: 400 !important;
}
#rap_ai_panel #rap_card_contact .rap-contact-field-stack__value:has(.rap-contact-inline-input:not(:placeholder-shown)) .rap-contact-inline-prefix {
    font-weight: 400 !important;
}
#rap_ai_panel #rap_card_contact .rap-form-terms--contact {
    margin-top: 1.35rem;
}

/* Legal: aligned label / value columns */
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-lease,
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-money {
    display: grid !important;
    grid-template-columns: var(--rap-review-label-col) 1fr;
    column-gap: 1rem;
    row-gap: 0.35rem;
    align-items: baseline !important;
}
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-lease .rap-legal-inline-prefix {
    grid-column: 1;
}

/* EPC / council tax: label on same row as first pill */
#rap_ai_panel #rap_card_legal .rap-legal-inline-seg-row {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center !important;
    gap: 0.35rem 0.65rem;
}
#rap_ai_panel #rap_card_legal .rap-legal-inline-seg-row .rap-legal-inline-prefix--inline-seg {
    flex: 0 0 auto;
    margin: 0 !important;
    line-height: 1.25;
    align-self: center;
}
#rap_ai_panel #rap_card_legal .rap-legal-inline-seg-row .rap-seg {
    flex: 0 1 auto;
    min-width: 0;
}

#rap_ai_panel #rap_card_core select#rap_ai_property_type.rap-ai-field--seg-sync-only {
    display: none !important;
}
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-lease .rap-legal-lease-field {
    grid-column: 2;
}
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-money .rap-legal-inline-prefix {
    grid-column: 1;
}
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-money .rap-legal-money-amount-group {
    grid-column: 2;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4ch;
}
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-money .rap-legal-money-group {
    grid-column: auto;
}
#rap_ai_panel #rap_card_legal .rap-legal-inline-prefix {
    font-weight: 400 !important;
}

/* Sale-only block: tenure, shared %, no chain (hidden for To rent) */
#rap_ai_panel #rap_card_legal .rap-legal-sale-tenure-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
}
#rap_ai_panel #rap_card_legal .rap-legal-sale-tenure-block[hidden] {
    display: none !important;
}
#rap_ai_panel #rap_card_legal .rap-legal-no-chain-stack__value,
#rap_ai_panel #rap_card_legal .rap-legal-tenancies-stack__value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}
/* Sync-only field — never show native Chain / No chain dropdown */
#rap_ai_panel #rap_card_legal #rap_ai_chain_status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
#rap_ai_panel #rap_card_legal .rap-legal-no-chain-stack[hidden],
#rap_ai_panel #rap_card_legal .rap-legal-tenancies-stack[hidden] {
    display: none !important;
}

/* To rent: match Utilities row spacing; align label/value columns */
#rap_ai_panel #rap_card_legal #rap_rent_legal_details.rap-rent-legal-block {
    display: flex;
    flex-direction: column;
    width: 100%;
}
/* [hidden] must win — without this, display:flex keeps rent fields visible when not To rent */
#rap_ai_panel #rap_card_legal #rap_rent_legal_details.rap-rent-legal-block[hidden] {
    display: none !important;
}
#rap_ai_panel #rap_card_legal #rap_rent_legal_details > .rap-rent-legal-stack {
    margin-bottom: 0.65rem;
}
#rap_ai_panel #rap_card_legal #rap_rent_legal_details > .rap-rent-legal-stack:last-of-type {
    margin-bottom: 0;
}
#rap_ai_panel #rap_card_legal #rap_rent_legal_details > select.rap-ai-field[tabindex="-1"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
#rap_ai_panel #rap_card_legal .rap-rent-legal-grid-row {
    display: grid !important;
    grid-template-columns: var(--rap-review-label-col) 1fr;
    column-gap: 1rem;
    row-gap: 0.35rem;
    align-items: baseline !important;
    width: 100%;
}
#rap_ai_panel #rap_card_legal .rap-rent-legal-grid-row .rap-legal-inline-prefix {
    grid-column: 1;
}
#rap_ai_panel #rap_card_legal .rap-rent-legal-grid-row > .rap-rent-date-input,
#rap_ai_panel #rap_card_legal .rap-rent-legal-grid-row > .rap-legal-lease-field,
#rap_ai_panel #rap_card_legal .rap-rent-legal-grid-row > .rap-legal-money-group {
    grid-column: 2;
    justify-self: start;
}
#rap_ai_panel #rap_card_legal .rap-rent-date-input {
    font-size: 1.25rem !important;
    font-weight: 400 !important;
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    line-height: 1.2 !important;
    field-sizing: content;
    accent-color: #c4c4c4;
    color-scheme: light;
}
#rap_ai_panel #rap_card_legal .rap-rent-date-input:valid {
    font-weight: 700 !important;
    color: #333 !important;
    -webkit-text-fill-color: #333 !important;
}
#rap_ai_panel #rap_card_legal .rap-rent-date-input:focus,
#rap_ai_panel #rap_card_legal .rap-rent-date-input:focus-visible {
    background: transparent !important;
    background-color: transparent !important;
    outline: none;
    border-radius: 0;
}
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-fields-wrapper {
    background-color: transparent !important;
    border-radius: 0;
    padding: 0;
}
#rap_ai_panel #rap_card_legal .rap-rent-date-input:focus::-webkit-datetime-edit-fields-wrapper,
#rap_ai_panel #rap_card_legal .rap-rent-date-input:focus-within::-webkit-datetime-edit-fields-wrapper {
    background-color: transparent !important;
}
/* WebKit paints each date segment (day/month/year) with a default blue when active — override explicitly */
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit,
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-text {
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    background-color: transparent !important;
}
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-month-field,
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-day-field,
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-year-field {
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    padding: 0;
    border-radius: 0;
}
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-month-field:focus,
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-day-field:focus,
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-year-field:focus,
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-month-field:active,
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-day-field:active,
#rap_ai_panel #rap_card_legal .rap-rent-date-input::-webkit-datetime-edit-year-field:active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    outline: none !important;
}
#rap_ai_panel #rap_card_legal .rap-rent-date-input::selection {
    background: #d0d0d0 !important;
    background-color: #d0d0d0 !important;
    color: #333 !important;
}
#rap_ai_panel #rap_card_legal .rap-legal-lease-field--rent-date {
    gap: 0;
    min-width: 0;
}
#rap_card_legal .rap-legal-lease-field:has(#rap_ai_min_tenancy_months),
#rap_card_legal .rap-legal-lease-field:has(#rap_ai_rent_deposit) {
    gap: 0.28ch;
}
#rap_ai_panel #rap_card_legal .rap-legal-lease-field--rent-tenancy,
#rap_ai_panel #rap_card_legal .rap-legal-lease-field--rent-deposit {
    gap: 0.28ch;
}
#rap_ai_panel #rap_card_legal .rap-rent-tenancy-input {
    field-sizing: content;
    min-width: 2ch !important;
    max-width: 6ch !important;
}
/* Empty state must fit the full "Enter months" placeholder; tighten again once digits are entered. */
#rap_ai_panel #rap_card_legal .rap-rent-tenancy-input:placeholder-shown {
    min-width: 13ch !important;
    max-width: none !important;
    width: auto !important;
    overflow: visible !important;
}
#rap_ai_panel #rap_card_legal .rap-rent-deposit-input {
    field-sizing: content;
    min-width: 2ch !important;
    max-width: 4ch !important;
}
#rap_ai_panel #rap_card_legal .rap-rent-deposit-input:placeholder-shown {
    min-width: 18ch !important;
    max-width: none !important;
    width: auto !important;
    overflow: visible !important;
}
#rap_ai_panel #rap_card_legal .rap-rent-deposit-input:not(:placeholder-shown) {
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
}
#rap_ai_panel #rap_card_legal .rap-rent-tenancy-input::placeholder {
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}
#rap_ai_panel #rap_card_legal .rap-rent-deposit-input::placeholder {
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}
#rap_ai_panel #rap_card_contact .rap-contact-inline-input::placeholder {
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}
#rap_ai_panel #rap_card_legal .rap-rent-legal-seg-value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    width: 100%;
}

/* Contact: aligned columns */
#rap_ai_panel #rap_card_contact .rap-contact-field-stack__value {
    display: grid !important;
    grid-template-columns: var(--rap-review-label-col) 1fr;
    column-gap: 0.45rem;
    row-gap: 0.35rem;
    align-items: baseline !important;
}
#rap_ai_panel #rap_card_contact .rap-contact-inline-prefix {
    grid-column: 1;
}
#rap_ai_panel #rap_card_contact .rap-contact-inline-input {
    grid-column: 2;
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
}

/* Features: section label column + chips column */
#rap_ai_panel #rap_card_features .rap-feature-section {
    display: grid !important;
    grid-template-columns: var(--rap-review-label-col) 1fr;
    column-gap: 1rem;
    row-gap: 0.35rem;
    align-items: start !important;
}
#rap_ai_panel #rap_card_features .rap-feature-section__label {
    display: block;
    grid-column: 1;
}
#rap_ai_panel #rap_card_features .rap-feature-section__chips {
    grid-column: 2;
    min-width: 0;
}
#rap_ai_panel #rap_card_features .rap-feature-more-wrap {
    display: grid !important;
    grid-template-columns: var(--rap-review-label-col) 1fr;
    column-gap: 1rem;
    row-gap: 0.35rem;
    align-items: baseline !important;
    width: 100%;
}
#rap_ai_panel #rap_card_features .rap-feature-more-title {
    grid-column: 1;
    margin: 0;
}
#rap_ai_panel #rap_card_features .rap-feature-add-inline--global {
    grid-column: 2;
    min-width: 0;
}
/* Feature rows: match vertical rhythm of Contact (Estate agent → Property link ≈ 0.45rem) */
#rap_ai_panel #rap_card_features .rap-features-component {
    gap: 0.45rem;
    margin-top: 0;
}

.rap-core-select,
.rap-core-unit-select,
.rap-inline-muted-input,
.rap-core-inline-input {
    width: 100%;
    border: none;
    background: transparent;
    color: #3d3d3d;
    font-size: 0.95rem;
}

.rap-postcode-inline-note {
    color: #8a8a8a;
    font-size: 0.82rem;
    margin-left: 8px;
}

.rap-selected-address-inline {
    color: #8a8a8a;
    font-size: 0.82rem;
    margin-left: 10px;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rap-core-transaction-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}

#rap_card_core .rap-core-transaction-line .rap-core-transaction-row {
    margin-bottom: 0 !important;
    align-items: center;
}

/* Additional property details: consistent row spacing */
#rap_ai_panel .rap-additional-details-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#rap_ai_panel .rap-addl-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
}

#rap_ai_panel #rap_card_additional_details .rap-addl-row {
    gap: 0.5rem 0.85rem;
}

#rap_ai_panel .rap-addl-listed-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
}

#rap_ai_panel #rap_card_additional_details .rap-addl-row--conservation-listed {
    justify-content: flex-start;
}

#rap_ai_panel #rap_card_additional_details .rap-addl-listed-inline > .rap-seg,
#rap_ai_panel #rap_card_additional_details .rap-addl-listed-inline > .rap-seg-flow {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100%;
}

#rap_ai_panel #rap_flood_risk_types[hidden] {
    display: none !important;
}

/* Grade pills: [hidden] must win over #rap_card_additional_details .rap-seg { display: inline-flex !important } */
#rap_ai_panel #rap_listed_grade_seg[hidden] {
    display: none !important;
}

#rap_ai_panel #rap_card_additional_details #rap_listed_grade_seg {
    flex: 0 0 auto;
    width: auto !important;
}

.rap-core-field-stack__value--postcode-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    margin-top: calc(0.08rem + 3px);
    margin-bottom: 2px;
}

.rap-core-field-stack--postcode-block {
    width: 100%;
}

/* Same label track + gap as postcode row so address text lines up with postcode (--rap-core-label-col set on #rap_ai_panel) */
#rap_card_core .rap-core-field-stack__value--address-line {
    display: grid !important;
    grid-template-columns: var(--rap-core-label-col, 8.2rem) minmax(0, 1fr) auto;
    align-items: center !important;
    column-gap: 0.15rem;
    margin-top: 0.14rem;
    min-width: 0;
    overflow: visible;
}

#rap_card_core .rap-address-selected-input {
    width: 100% !important;
    max-width: none;
    min-width: 0;
    grid-column: 2;
    grid-row: 1;
    /* Match postcode value inset (see .rap-postcode-input in this card) */
    padding-left: 0 !important;
}

#rap_ai_address_line_wrap[hidden] {
    display: none !important;
}

.rap-ai-address-select-wrap {
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
}

#rap_card_core .rap-core-field-stack--uprn-line {
    margin-top: 0;
}

#rap_ai_panel .rap-core-address-dropdown {
    width: 100%;
    max-width: 100%;
    /* Same scale as postcode / UPRN value line (1.25rem) — mobile override below */
    font-size: 1.25rem;
    line-height: 1.2;
    padding: 0.35rem 0.5rem;
    border: 1px solid #dadada;
    border-radius: 4px;
    background: #fff;
    color: #3d3d3d;
    box-sizing: border-box;
}

.rap-core-field-stack__value--uprn-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    width: 100%;
}

.rap-core-field-stack__value--uprn-inline .rap-inline-muted-input {
    flex: 1 1 12rem;
    min-width: 8rem;
    max-width: 100%;
}

.rap-legal-tenure-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.rap-legal-tenure-row .rap-tenure-seg--base,
.rap-legal-tenure-row .rap-tenure-seg--shared {
    flex: 0 1 auto;
}

#rap_ai_panel #rap_card_utilities .rap-util-seg-stack {
    margin-bottom: 0.65rem;
}

#rap_ai_panel #rap_card_utilities .lds-services-available {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

#rap_ai_panel #rap_card_utilities .lds-services-available .rap-util-seg-stack {
    margin-bottom: 0;
}

#rap_ai_panel #rap_card_additional_details .lds-site-constraints {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* The final seg row should not add its inter-row margin before the divider line; the
   card padding-bottom alone sets the end space so it matches the other sections. */
#rap_ai_panel #rap_card_utilities .rap-preview-card__body > .rap-util-seg-stack:last-of-type {
    margin-bottom: 0;
}

#rap_ai_panel #rap_card_utilities .rap-util-seg-stack .rap-core-field-stack__value {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.rap-inline-number-with-unit {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.rap-multi-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 6px 0 12px;
}

.rap-multi-check-row label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid #dadada;
    border-right: none;
    background: #f7f7f7;
    color: #3c3c3c;
    font-size: 0.92rem;
    cursor: pointer;
}

.rap-multi-check-row label:last-child {
    border-right: 1px solid #dadada;
}

.rap-multi-check-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rap-multi-check-row label:has(input[type="checkbox"]:checked) {
    background: #ececec;
    color: #1e1e1e;
    box-shadow: inset 0 0 0 1px #c8c8c8;
}

.rap-preview-card--collapsible .rap-preview-card__head {
    cursor: pointer;
    user-select: none;
}

.rap-preview-card--collapsible .rap-preview-card__title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.rap-preview-card--collapsible .rap-preview-card__title::after {
    content: '';
    display: inline-block;
    width: 0.38em;
    height: 0.38em;
    margin-left: 0.1rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.55;
    transition: transform 0.2s ease, opacity 0.2s ease;
    vertical-align: middle;
}

.rap-preview-card--collapsible.is-collapsed .rap-preview-card__title::after {
    transform: rotate(-45deg);
}

.rap-preview-card--collapsible.is-collapsed .rap-preview-card__body {
    display: none !important;
}

.rap-address-seg {
    flex-wrap: wrap;
    gap: 0;
}

.rap-address-seg .rap-seg-btn {
    width: 100%;
    text-align: left;
    border-right: 1px solid #dadada;
}

.rap-seg-hidden-field,
.rap-ai-field[aria-hidden="true"][tabindex="-1"] {
    display: none !important;
}

@media (max-width: 860px) {
    #rap_ai_panel {
        --rap-review-label-col: 10.5rem;
        --rap-core-label-col: 8.25rem;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }
    /* Stop wide core rows (e.g. fit-content segments) from widening the panel */
    #rap_ai_panel .rap-preview-card__body {
        min-width: 0;
        overflow-x: hidden;
    }
    /* EPC / Council tax band: on narrow screens drop the chip row below its
       label (instead of sitting inline to the right) so the title leads and the
       selector reads as a single block beneath it. */
    #rap_ai_panel #rap_card_legal .rap-legal-inline-seg-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.3rem;
    }
    #rap_ai_panel #rap_card_legal .rap-legal-inline-seg-row .rap-legal-inline-prefix--inline-seg {
        width: 100%;
        flex: 0 0 auto;
    }
    /* Utilities / additional: full-width pill rows so auto-split wraps instead of truncating */
    #rap_ai_panel #rap_card_utilities .rap-util-seg-stack .rap-core-field-stack__value,
    #rap_ai_panel #rap_card_additional_details .rap-addl-row {
        width: 100%;
        min-width: 0;
    }
    #rap_ai_panel #rap_card_utilities .rap-seg-flow,
    #rap_ai_panel #rap_card_additional_details .rap-seg-flow {
        width: 100%;
        max-width: 100%;
    }
    #rap_ai_panel #rap_card_utilities .rap-seg,
    #rap_ai_panel #rap_card_additional_details .rap-multi-seg,
    #rap_ai_panel #rap_card_additional_details .rap-seg-flow > .rap-seg {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    /* Keep Listed building + grade pills adjacent (don't stretch the multi-seg full width). */
    #rap_ai_panel #rap_card_additional_details .rap-addl-listed-inline > .rap-multi-seg,
    #rap_ai_panel #rap_card_additional_details .rap-addl-listed-inline > .rap-seg-flow,
    #rap_ai_panel #rap_card_additional_details .rap-addl-listed-inline > .rap-seg-flow > .rap-seg,
    #rap_ai_panel #rap_card_additional_details .rap-addl-listed-inline #rap_listed_grade_seg {
        width: auto !important;
        max-width: 100%;
    }
    /* iOS: ≥18px on focused controls avoids input zoom inside modals */
    #rap_ai_panel .rap-core-address-dropdown {
        min-height: 44px;
        padding: 0.45rem 0.55rem;
        font-size: 18px;
    }
    #rap_ai_panel #rap_card_core input.rap-postcode-input,
    #rap_ai_panel #rap_card_core .rap-address-selected-input {
        font-size: 18px !important;
        line-height: 1.35 !important;
        -webkit-text-size-adjust: 100%;
    }
    #rap_ai_panel #rap_card_core input.rap-postcode-input::placeholder,
    #rap_ai_panel #rap_card_core .rap-address-selected-input::placeholder {
        font-size: 18px !important;
    }
    /* Softer scroll-into-view when opening the native address picker */
    #rap_ai_panel #rap_ai_address_select.rap-core-address-dropdown {
        scroll-margin-top: 12px;
        scroll-margin-bottom: min(28vh, 220px);
    }
    #register-form-overlay.custom-form-overlay,
    #modify-form-overlay.custom-form-overlay {
        min-width: 0 !important;
        width: min(96vw, 100%) !important;
        max-width: min(96vw, 100%) !important;
        max-height: 88vh !important;
        padding: 0.45rem 0.65rem 0.15rem !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }
    .custom-form-overlay {
        min-width: 0;
        width: min(96vw, 100%);
        height: auto;
        max-width: min(96vw, 100%);
        max-height: 88vh;
        padding: 0.6rem 0.8rem 0.2rem;
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }
}

/* ═══════════════════════════════════════════
   Privacy & Cookies / Terms & Conditions page styles
   Font sizes mirror the for-agents (rapp-) page hierarchy.
   Both slug variants covered for Terms in case WP slug differs.
═══════════════════════════════════════════ */

/* Shared shorthand — applied via a single class we add via PHP */
.rap-policy-page .content {
    width: 100% !important;
}

.rap-policy-page .entry-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
    color: #333;
    font-size: 1rem;
    line-height: 1.75;
}

/* Page title — identical to .rapp-hero__heading: clamp(2rem, 5vw, 3rem) weight 800
   !important overrides Genesis theme's .entry-title specificity */
.rap-policy-page .entry-title {
    font-size: clamp(2rem, 5vw, 3rem) !important;
    font-weight: 800 !important;
    color: #333 !important;
    line-height: 1.1 !important;
    max-width: 860px;
    margin: 1.75rem auto 2.25rem !important;
    padding-bottom: 1rem;
    border-bottom: 3px solid #eb0c0c;
}

/* H2 section headings — identical to .rapp-section__heading: clamp(1.5rem, 3vw, 2rem) weight 800
   Dotted rule above each H2 divides the main sections */
.rap-policy-page .entry-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem) !important;
    font-weight: 800 !important;
    color: #333;
    margin: 0 0 1rem !important;
    padding-top: 2.25rem;
    line-height: 1.2;
    border-top: 1px dotted #ccc;
}
/* No divider before the very first H2 */
.rap-policy-page .entry-content h2:first-of-type {
    border-top: none;
    padding-top: 1rem;
}

/* H3 sub-headings */
.rap-policy-page .entry-content h3 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #333;
    margin: 1.75rem 0 0.5rem !important;
    line-height: 1.3;
}

/* Paragraphs */
.rap-policy-page .entry-content p {
    margin-bottom: 1.15rem;
    color: #333;
    font-size: 1rem;
    line-height: 1.75;
}

/* Lists */
.rap-policy-page .entry-content ul,
.rap-policy-page .entry-content ol {
    padding-left: 1.4rem;
    margin-bottom: 1.15rem;
    color: #333;
}
.rap-policy-page .entry-content li {
    margin-bottom: 0.45rem;
    font-size: 1rem;
    line-height: 1.7;
}

/* Links & email addresses — plain text, not styled as hyperlinks */
.rap-policy-page .entry-content a {
    color: #333;
    text-decoration: none;
    pointer-events: none;
    cursor: text;
}
.rap-policy-page .entry-content a:hover {
    color: #333;
    text-decoration: none;
}

/* Small / italic notes (e.g. "Last updated…") */
.rap-policy-page .entry-content em,
.rap-policy-page .entry-content small {
    color: #666;
    font-size: 0.9rem;
}

/* Sidebar widget title — add 3px above "LOCAL NEWS" etc. */
.sidebar .widget-title,
.sidebar-primary .widget-title,
.sidebar .widgettitle,
.sidebar-primary .widgettitle {
    margin-top: 4px !important;
}

/* About page — main page title only (scoped to .content to avoid sidebar widget post titles). */
.rap-about-page .content .entry-header .entry-title {
    font-size: clamp(2rem, 5vw, 3rem) !important;
    font-weight: 800 !important;
    color: #333 !important;
    line-height: 1.1 !important;
    margin-top: 10px !important;
    margin-bottom: 19px !important;
}

/* Slug-based fallback selectors covering all plausible WP slug variants */
.page-slug-privacy-policy .entry-title,
.page-slug-privacy .entry-title,
.page-slug-privacy-cookies .entry-title,
.page-slug-privacy-and-cookies .entry-title,
.page-slug-terms-conditions .entry-title,
.page-slug-terms-and-conditions .entry-title,
.page-slug-terms .entry-title {
    font-size: clamp(2rem, 5vw, 3rem) !important;
    font-weight: 800 !important;
    color: #333 !important;
    line-height: 1.1 !important;
    padding-bottom: 1rem;
    border-bottom: 3px solid #eb0c0c;
}
.page-slug-privacy-policy .entry-content h2,
.page-slug-privacy .entry-content h2,
.page-slug-privacy-cookies .entry-content h2,
.page-slug-privacy-and-cookies .entry-content h2,
.page-slug-terms-conditions .entry-content h2,
.page-slug-terms-and-conditions .entry-content h2,
.page-slug-terms .entry-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem) !important;
    font-weight: 800 !important;
    color: #333;
    margin: 0 0 1rem !important;
    padding-top: 2.25rem;
    line-height: 1.2;
    border-top: 1px dotted #ccc;
}
.page-slug-privacy-policy .entry-content h2:first-of-type,
.page-slug-privacy .entry-content h2:first-of-type,
.page-slug-privacy-cookies .entry-content h2:first-of-type,
.page-slug-privacy-and-cookies .entry-content h2:first-of-type,
.page-slug-terms-conditions .entry-content h2:first-of-type,
.page-slug-terms-and-conditions .entry-content h2:first-of-type,
.page-slug-terms .entry-content h2:first-of-type {
    border-top: none;
    padding-top: 1rem;
}
.page-slug-privacy-policy .entry-content h3,
.page-slug-privacy .entry-content h3,
.page-slug-privacy-cookies .entry-content h3,
.page-slug-privacy-and-cookies .entry-content h3,
.page-slug-terms-conditions .entry-content h3,
.page-slug-terms-and-conditions .entry-content h3,
.page-slug-terms .entry-content h3 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
}
/* Links & emails — plain text on all policy pages */
.page-slug-privacy-policy .entry-content a,
.page-slug-privacy .entry-content a,
.page-slug-privacy-cookies .entry-content a,
.page-slug-privacy-and-cookies .entry-content a,
.page-slug-terms-conditions .entry-content a,
.page-slug-terms-and-conditions .entry-content a,
.page-slug-terms .entry-content a {
    color: #333;
    text-decoration: none;
    pointer-events: none;
    cursor: text;
}

/*
 * iOS (all WebKit browsers): position:fixed + translate(-50%,-50%) on the modal breaks input focus scaling (incl. landscape phones >860px).
 * 1024px covers iPhone Pro Max landscape. Class rap-browser-ios is set for every iPhone/iPad browser, not Safari-only UA.
 */
@media (max-width: 1024px) {
    html.rap-browser-ios #register-form-overlay.custom-form-overlay,
    html.rap-browser-ios #modify-form-overlay.custom-form-overlay {
        left: max(12px, env(safe-area-inset-left, 0px)) !important;
        right: max(12px, env(safe-area-inset-right, 0px)) !important;
        top: 0 !important;
        bottom: 0 !important;
        margin-top: auto !important;
        margin-bottom: auto !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        height: fit-content !important;
        max-height: min(88vh, 100dvh - 1.5rem) !important;
    }
}

/* ── Submit modal: submit-stack top-up rows (see topup-cards.php) ── */
#modal-box.rap-submit-modal-box {
    background: transparent;
    padding: 0;
    max-width: 460px;
    width: min(460px, 92vw);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    max-height: min(92vh, 780px);
    overflow-x: hidden;
    overflow-y: auto;
}
#modal-box.rap-submit-modal-box #modal-message {
    margin: 0;
}
#modal-box.rap-submit-modal-box #modal-close,
#modal-box.rap-submit-modal-box .rap-form-close {
    top: 10px;
    right: 10px;
    margin: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    background: #f5f5f5;
    border: 1px solid #e6e6e6;
    border-radius: 50%;
    z-index: 3;
}

.rap-submit-modal {
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #333;
}
.rap-submit-modal__header {
    background: #fff;
    padding: 1.75rem 1.35rem 1rem;
    border-bottom: 1px solid #e8e8e8;
}
.rap-submit-modal__header:not(:has(.rap-submit-modal__steps)) {
    padding-bottom: 1.15rem;
}
.rap-submit-modal__status {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a7a3c;
    letter-spacing: 0.01em;
}
.rap-submit-modal__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1a7a3c;
    flex-shrink: 0;
}
.rap-submit-modal__title {
    margin: 0;
    font-family: "Roboto", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(1.45rem, 4.5vw, 1.85rem);
    font-weight: 700;
    line-height: 1.15;
    color: #333;
}
.rap-submit-modal__title + .rap-submit-modal__steps {
    margin-top: 1.1rem;
}
.rap-submit-modal__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
}
.rap-submit-modal__step {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    position: relative;
    min-width: 0;
}
.rap-submit-modal__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 15px;
    left: calc(50% + 18px);
    width: calc(100% - 36px);
    height: 2px;
    background: #ddd;
    pointer-events: none;
}
.rap-submit-modal__step--done:not(:last-child)::after {
    background: #1a7a3c;
}
.rap-submit-modal__step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    background: #ececec;
    color: #888;
    position: relative;
    z-index: 1;
}
.rap-submit-modal__step--done .rap-submit-modal__step-icon {
    background: #1a7a3c;
    color: #fff;
    font-size: 1rem;
}
.rap-submit-modal__step--active .rap-submit-modal__step-icon {
    background: #C90808;
    color: #fff;
}
.rap-submit-modal__step-label {
    font-size: 0.78rem;
    color: #888;
    text-align: center;
    line-height: 1.2;
}
.rap-submit-modal__step--done .rap-submit-modal__step-label,
.rap-submit-modal__step--active .rap-submit-modal__step-label {
    color: #333;
    font-weight: 700;
}
.rap-submit-modal__body {
    background: #EDE9E3;
    padding: 1.15rem 1.25rem 1.25rem;
}
.rap-submit-modal__alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid #d9b44a;
    border-radius: 10px;
    background: #fff9e6;
    color: #5c4a12;
}
.rap-submit-modal__alert--ok {
    border-color: #9fd4ad;
    background: #f0faf3;
    color: #1a5c32;
}
.rap-submit-modal__alert-icon {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1.35;
}
.rap-submit-modal__alert p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}
.rap-submit-modal__cta-title {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #333;
}
.rap-submit-modal__credits-note {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #444;
}
.rap-submit-modal__note {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #555;
}
.rap-submit-modal__dismiss {
    display: block;
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.72rem 1rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #f3f3f3;
    color: #333;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.rap-submit-modal__dismiss:hover,
.rap-submit-modal__dismiss:focus {
    background: #eaeaea;
    border-color: #aaa;
    outline: none;
}
.rap-submit-modal__dismiss:focus-visible {
    outline: 2px solid #555;
    outline-offset: 2px;
}
#modal-box.rap-submit-modal-box .ldsap-topup .topup-vat-note {
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
}

/* ── Queued listing submit modal (post-submit + top-up) ── */
#modal-box.rap-submit-modal-box--nocredits {
    max-width: 375px !important;
    width: min(375px, 90vw);
    background: #fff;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.14);
}
#modal-box.rap-submit-modal-box--nocredits #modal-close,
#modal-box.rap-submit-modal-box--nocredits .rap-form-close {
    background: #f5f5f5;
    border: 1px solid #e6e6e6;
}
.rap-submit-modal--nocredits {
    background: #fff;
    padding: 1.2rem 1.15rem 1.15rem;
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.rap-submit-modal--nocredits .rap-submit-modal__title,
.rap-submit-modal--nocredits .rap-submit-modal__topup-title,
.rap-submit-modal--nocredits .topup-stack__price {
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.rap-submit-modal--nocredits .rap-submit-modal__intro {
    padding: 0;
    background: transparent;
    border: 0;
}
.rap-submit-modal--nocredits .rap-submit-modal__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 0.85rem;
    border-radius: 50%;
    background: #C90808;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}
.rap-submit-modal--nocredits .rap-submit-modal__title {
    margin: 0 0 0.55rem;
    font-size: clamp(1.35rem, 4vw, 1.65rem);
}
.rap-submit-modal--nocredits .rap-submit-modal__lede {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #333;
}
.rap-submit-modal--nocredits .rap-submit-modal__verify {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: #444;
}
.rap-submit-modal--nocredits .rap-submit-modal__verify--ok {
    color: #1a7a3c;
}
.rap-submit-modal--nocredits .rap-submit-modal__verify--warn {
    color: #c47200;
}
.rap-submit-modal--nocredits .rap-submit-modal__verify-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
}
.rap-submit-modal--nocredits .rap-submit-modal__verify-svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* Has-credits variant: ready section, credit row, top-up toggle */
.rap-submit-modal--with-credits .rap-submit-modal__ready {
    margin: 0 0 1rem;
}
.rap-submit-modal--with-credits .rap-submit-modal__ready-title {
    margin: 0 0 0.4rem;
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(1.1rem, 3.4vw, 1.3rem);
    font-weight: 700;
    line-height: 1.25;
    color: #333;
}
.rap-submit-modal--with-credits .rap-submit-modal__ready-lede {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #333;
}
.rap-submit-modal--with-credits .rap-submit-modal__credit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin: 0.85rem 0 0;
}
.rap-submit-modal--with-credits .rap-submit-modal__credit-count {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    color: #555;
}
.rap-submit-modal--with-credits .rap-submit-modal__credit-count strong {
    color: #333;
    font-weight: 700;
}
.rap-submit-modal--with-credits .rap-submit-modal__topup-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    font: inherit;
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}
.rap-submit-modal--with-credits .rap-submit-modal__topup-toggle:hover,
.rap-submit-modal--with-credits .rap-submit-modal__topup-toggle:focus {
    background: #f0f0f0;
    border-color: #aaa;
    outline: none;
}
.rap-submit-modal--with-credits .rap-submit-modal__topup-toggle:focus-visible {
    outline: 2px solid #555;
    outline-offset: 2px;
}
.rap-submit-modal--with-credits .rap-submit-modal__topup-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.15s ease;
}
.rap-submit-modal--with-credits .rap-submit-modal__topup-toggle[aria-expanded="true"] .rap-submit-modal__topup-arrow {
    transform: rotate(180deg);
}
.rap-submit-modal--with-credits .rap-submit-modal__topup-panel {
    margin-top: 1rem;
}
.rap-submit-modal--with-credits .rap-submit-modal__topup-panel[hidden] {
    display: none;
}
.rap-submit-modal--nocredits .rap-submit-modal__divider {
    height: 1px;
    margin: 1.15rem 0 1.1rem;
    background: #e5e5e5;
}
.rap-submit-modal--nocredits .rap-submit-modal__topup {
    padding: 0;
    background: transparent;
}
.rap-submit-modal--nocredits .rap-submit-modal__topup-title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.15rem, 3.5vw, 1.35rem);
    font-weight: 700;
    line-height: 1.25;
    color: #333;
}
.rap-submit-modal--nocredits .rap-submit-modal__topup-lede {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #444;
}
.rap-submit-modal--nocredits .rap-submit-modal__dismiss {
    margin-top: 1rem;
    background: #fff;
    border-color: #ccc;
    color: #333;
    font-weight: 600;
}
.rap-submit-modal--nocredits .ldsap-topup--submit-stack {
    margin: 0;
}
.rap-submit-modal--nocredits .topup-stack {
    border: 2px solid #C90808;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    background: #fff;
}
#modal-box.rap-submit-modal-box--nocredits .topup-stack__row.topup-option {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    width: 100%;
    margin: 0;
    padding: 0.8rem 0.85rem;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: background 0.15s ease;
    position: relative;
    box-sizing: border-box;
}
#modal-box.rap-submit-modal-box--nocredits .topup-stack__row.topup-option:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #d4d4d4;
    pointer-events: none;
}
#modal-box.rap-submit-modal-box--nocredits .topup-stack__row.topup-option:hover,
#modal-box.rap-submit-modal-box--nocredits .topup-stack__row.topup-option:focus {
    background: #f0f0f0 !important;
    outline: none;
}
#modal-box.rap-submit-modal-box--nocredits .topup-stack__row.topup-option:focus-visible {
    outline: 2px solid #555;
    outline-offset: -2px;
}
#modal-box.rap-submit-modal-box--nocredits .topup-stack__row.topup-option[aria-busy="true"] {
    opacity: 0.65;
    pointer-events: none;
}
.rap-submit-modal--nocredits .topup-stack__copy {
    flex: 1 1 auto;
    min-width: 0;
}
.rap-submit-modal--nocredits .topup-stack__credits-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.15rem;
}
.rap-submit-modal--nocredits .topup-stack__credits {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}
.rap-submit-modal--nocredits .topup-stack__save {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a7a3c;
    line-height: 1.2;
}
.rap-submit-modal--nocredits .topup-stack__meta {
    display: block;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #555;
}
.rap-submit-modal--nocredits .topup-stack__price-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.2rem;
    text-align: right;
    line-height: 1.1;
}
.rap-submit-modal--nocredits .topup-stack__price {
    display: inline-flex;
    align-items: baseline;
    font-size: clamp(1.95rem, 5.5vw, 2.4rem);
    font-weight: 700;
    color: #333;
}
.rap-submit-modal--nocredits .topup-stack__currency {
    font-size: 0.55em;
    font-weight: 800;
}
.rap-submit-modal--nocredits .topup-stack__vat {
    font-size: 13px;
    font-weight: 400;
    color: #888;
    line-height: 1.2;
}

/* --- New-development "Development details" card ------------------------------ */
#rap_card_development[hidden] {
    display: none;
}
#rap_card_development .rap-development-lede {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #6b6b6b;
}
#rap_ai_panel #rap_card_development .rap-development-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.42rem;
    width: 100%;
}
#rap_ai_panel #rap_card_development .rap-util-seg-stack {
    margin-bottom: 0.65rem;
}
#rap_ai_panel #rap_card_development .rap-util-seg-stack .rap-core-field-stack__value {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
#rap_ai_panel #rap_card_development .rap-legal-inline-seg-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
#rap_ai_panel #rap_card_development .rap-development-range {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1ch;
}
/* Align labels into a left column to match Core facts / Legal cards. */
#rap_ai_panel #rap_card_development .rap-core-inline-prefix {
    font-size: 1.25rem;
    font-weight: 400;
    color: #333;
    line-height: 1.2;
    flex: 0 0 auto;
}
#rap_ai_panel #rap_card_development .rap-core-field-stack:not(.rap-util-seg-stack) > .rap-core-field-stack__value:not(.rap-legal-inline-seg-row):not(.rap-development-range) {
    display: grid;
    grid-template-columns: var(--rap-core-label-col) 1fr;
    column-gap: 0.15rem;
    row-gap: 0.35rem;
    align-items: baseline;
}
#rap_ai_panel #rap_card_development .rap-core-field-stack:not(.rap-util-seg-stack) > .rap-core-field-stack__value:not(.rap-legal-inline-seg-row):not(.rap-development-range) > .rap-core-inline-prefix {
    grid-column: 1;
    justify-self: start;
}
#rap_ai_panel #rap_card_development .rap-development-range .rap-core-inline-prefix,
#rap_ai_panel #rap_card_development .rap-legal-inline-seg-row > .rap-core-inline-prefix {
    width: var(--rap-core-label-col);
    flex: 0 0 var(--rap-core-label-col);
}
#rap_ai_panel #rap_card_development .rap-development-features-hint {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    color: #8a8a8a;
    line-height: 1.4;
}

/* --- New-development adaptations inside Core facts --------------------------- */
#rap_card_core #rap_core_unit_types_stack[hidden],
#rap_card_core #rap_core_price_to_wrap[hidden],
#rap_card_core #rap_core_internal_area_to_wrap[hidden],
#rap_card_core #rap_legal_ground_rent_to_wrap[hidden],
#rap_card_core #rap_legal_service_charge_to_wrap[hidden],
#rap_card_legal #rap_legal_ground_rent_to_wrap[hidden],
#rap_card_legal #rap_legal_service_charge_to_wrap[hidden],
#rap_card_core #rap_core_bedrooms_stack[hidden],
#rap_card_core #rap_core_bathrooms_stack[hidden] {
    display: none !important;
}

/* New development: "from – to" range — amount group may wrap; unit pills drop to next line
   like PCM/PW on Price when the range is long. */
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline:has(#rap_core_internal_area_to_wrap:not([hidden])) .rap-internal-area-amount-group {
    display: inline-flex !important;
    grid-template-columns: none !important;
    width: auto !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    align-items: baseline;
    gap: 0.4ch;
    overflow: visible;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline:has(#rap_core_internal_area_to_wrap:not([hidden])) .rap-core-unit-seg--inline {
    flex: 0 1 auto;
    min-width: 0;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline:has(#rap_core_internal_area_to_wrap:not([hidden])) {
    overflow: visible;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline:has(#rap_core_internal_area_to_wrap:not([hidden])) .rap-core-range-to {
    overflow: visible;
    flex: 0 0 auto;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline:has(#rap_core_internal_area_to_wrap:not([hidden])) .rap-core-inline-prefix,
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price:has(#rap_core_price_to_wrap:not([hidden])) .rap-core-inline-prefix {
    width: var(--rap-core-label-col) !important;
    max-width: var(--rap-core-label-col) !important;
    flex: 0 0 var(--rap-core-label-col) !important;
}
/* Range inputs: same sizing as price — field-sizing + 11ch cap; row wrap pushes units down. */
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline:has(#rap_core_internal_area_to_wrap:not([hidden])) .rap-internal-area-input {
    field-sizing: content;
    width: auto !important;
    min-width: 2ch !important;
    max-width: 11ch !important;
    flex: 0 0 auto;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline:has(#rap_core_internal_area_to_wrap:not([hidden])) #rap_ai_internal_area:placeholder-shown {
    min-width: 3ch;
    max-width: 8ch;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--internal-area-inline:has(#rap_core_internal_area_to_wrap:not([hidden])) #rap_ai_internal_area_to:placeholder-shown {
    min-width: 2ch;
    max-width: 6ch;
}
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price:has(#rap_core_price_to_wrap:not([hidden])) .rap-price-amount-group {
    display: inline-flex !important;
    grid-template-columns: none !important;
    width: auto !important;
    align-items: baseline;
    gap: 0.4ch;
}
/* Price-from must hug its content (like internal area) so there is no empty gap
   before the "–" separator. */
#rap_ai_panel #rap_card_core .rap-core-field-stack__value--price:has(#rap_core_price_to_wrap:not([hidden])) .rap-price-input {
    field-sizing: content;
    width: auto !important;
    min-width: 2ch !important;
    max-width: 11ch !important;
}

/* New development: ground rent / service charge "from – to" range in Legal details */
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-money:has(#rap_legal_ground_rent_to_wrap:not([hidden])) .rap-legal-money-amount-group,
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-money:has(#rap_legal_service_charge_to_wrap:not([hidden])) .rap-legal-money-amount-group {
    display: inline-flex !important;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.4ch;
    grid-column: 2;
}
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-money:has(#rap_legal_ground_rent_to_wrap:not([hidden])) .rap-legal-stack-input,
#rap_ai_panel #rap_card_legal .rap-core-field-stack__value--legal-money:has(#rap_legal_service_charge_to_wrap:not([hidden])) .rap-legal-stack-input {
    field-sizing: content;
    width: auto !important;
    min-width: 2ch !important;
    max-width: 11ch !important;
}
#rap_ai_panel #rap_card_core #rap_core_unit_types_stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.42rem;
    width: 100%;
}
#rap_ai_panel #rap_card_core #rap_core_unit_types_stack .rap-nd-unit-mix-row,
#rap_ai_panel #rap_card_core #rap_core_unit_types_stack .rap-core-field-stack__value {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
#rap_ai_panel #rap_card_core #rap_core_unit_types_stack .rap-core-inline-prefix {
    width: var(--rap-core-label-col);
    flex: 0 0 var(--rap-core-label-col);
}
.rap-core-range-to {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4ch;
}
.rap-core-range-to__sep {
    color: #333;
    font-size: 1.25rem;
    font-weight: 700;
}
#rap_ai_panel #rap_card_development .rap-util-seg-stack .rap-core-inline-prefix {
    width: var(--rap-core-label-col);
    flex: 0 0 var(--rap-core-label-col);
}

/* Units total / available are plain entry values — drop the number spinner and
   any border / focus ring so they read as inline text like the other entries. */
#rap_ai_panel #rap_card_development input#rap_ai_units_total,
#rap_ai_panel #rap_card_development input#rap_ai_units_available {
    -moz-appearance: textfield;
    appearance: textfield;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}
#rap_ai_panel #rap_card_development input#rap_ai_units_total:focus,
#rap_ai_panel #rap_card_development input#rap_ai_units_total:focus-visible,
#rap_ai_panel #rap_card_development input#rap_ai_units_available:focus,
#rap_ai_panel #rap_card_development input#rap_ai_units_available:focus-visible {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}
#rap_ai_panel #rap_card_development input#rap_ai_units_total::-webkit-outer-spin-button,
#rap_ai_panel #rap_card_development input#rap_ai_units_total::-webkit-inner-spin-button,
#rap_ai_panel #rap_card_development input#rap_ai_units_available::-webkit-outer-spin-button,
#rap_ai_panel #rap_card_development input#rap_ai_units_available::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Development value column: inline text entries share one left edge (no card padding). */
#rap_ai_panel #rap_card_development .rap-core-field-stack:not(.rap-util-seg-stack) > .rap-core-field-stack__value:not(.rap-legal-inline-seg-row):not(.rap-development-range) > .rap-core-inline-input,
#rap_ai_panel #rap_card_development .rap-core-field-stack:not(.rap-util-seg-stack) > .rap-core-field-stack__value:not(.rap-legal-inline-seg-row):not(.rap-development-range) > #rap_ai_completion_date {
    grid-column: 2;
    justify-self: start;
    width: auto !important;
    max-width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    vertical-align: baseline;
}

/* Est. completion: native quarter select — dropdown options slightly smaller than OS default. */
#rap_ai_panel #rap_card_development #rap_ai_completion_date {
    min-width: 0;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.2;
    color: #888;
    cursor: pointer;
    -webkit-padding-start: 0;
    padding-inline-start: 0;
}
#rap_ai_panel #rap_card_development #rap_ai_completion_date option {
    font-size: 1.05rem;
    font-weight: 400;
    color: #333;
}
#rap_ai_panel #rap_card_development #rap_ai_completion_date:focus,
#rap_ai_panel #rap_card_development #rap_ai_completion_date:focus-visible {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}
#rap_ai_panel #rap_card_development #rap_ai_completion_date:has(option[value=""]:checked) {
    color: #888;
    font-weight: 400;
}
#rap_ai_panel #rap_card_development #rap_ai_completion_date:not(:has(option[value=""]:checked)) {
    font-weight: 700;
    color: #333;
}

/* Development details text/number entries (Development name, Developer, Units total,
   Units available): sized to match the Price entry (1.25rem) and bold once entered,
   like the rest of the form (placeholders stay light). */
#rap_ai_panel #rap_card_development input#rap_ai_development_name,
#rap_ai_panel #rap_card_development input#rap_ai_developer_name,
#rap_ai_panel #rap_card_development input#rap_ai_units_total,
#rap_ai_panel #rap_card_development input#rap_ai_units_available {
    font-size: 1.25rem;
}
#rap_ai_panel #rap_card_development input#rap_ai_development_name:not(:placeholder-shown),
#rap_ai_panel #rap_card_development input#rap_ai_developer_name:not(:placeholder-shown),
#rap_ai_panel #rap_card_development input#rap_ai_units_total:not(:placeholder-shown),
#rap_ai_panel #rap_card_development input#rap_ai_units_available:not(:placeholder-shown) {
    font-weight: 700;
    color: #333;
}
/* Placeholder state: wide enough for full hint text (inputs default to width:auto in col 2). */
#rap_ai_panel #rap_card_development input#rap_ai_developer_name:placeholder-shown {
    min-width: 38ch !important;
    max-width: none !important;
    overflow: visible !important;
}
#rap_ai_panel #rap_card_development input#rap_ai_units_total:placeholder-shown {
    min-width: 17ch !important;
    max-width: none !important;
    overflow: visible !important;
}
#rap_ai_panel #rap_card_development input#rap_ai_units_available:placeholder-shown {
    min-width: 18ch !important;
    max-width: none !important;
    overflow: visible !important;
}
