/* Hallmark · shape: app screen · genre: modern-minimal · theme: brand · redesign: full
 * paper: oklch(96% 0.01 255) · accent: oklch(55% 0.2 27) · display: Figtree · body: Figtree
 * nav: kept · signature: the offer sheet, one light page on the page background with a four-step tracker and tap tiles · states: default, hover, focus, active, disabled, loading, error, success
 * axes: paper/Figtree/red · posture: restrained · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V3 · weakest: V, a form leaves little room to vary; kept the sheet one flat layer and led with tap tiles in place of radios */

/* Formwork forms on the Brookwood site. Colours, faces, sizes and spacing are tokens in tokens.css (the --color-sheet family).
   The sheet is light on every background, so labels, fields and buttons keep their contrast on navy, framed and white pages. */

/* The page: the listing the buyer came from beside the sheet, one column on a phone */
@media (min-width:1001px){
  .bw-content:has(>.fwk-wrapper){display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);grid-template-rows:auto 1fr;column-gap:var(--gap-columns);row-gap:var(--space-lg);align-items:start}
  .bw-content:has(>.fwk-wrapper)>*{grid-column:1;max-width:none;margin-top:0;margin-bottom:0}
  .bw-content:has(>.fwk-wrapper)>.fwk-wrapper{grid-column:2;grid-row:1/span 2}
  .bw-content:has(>.fwk-wrapper)>.bw-offices{grid-column:1/-1;grid-row:1;margin-bottom:var(--space-2xl)}
  .bw-content:has(>.fwk-wrapper):has(>.bw-offices)>.fwk-wrapper{grid-row:2/span 2}
  .bw-content:has(>.fwk-wrapper)>.bw-offer-for{flex-direction:column;align-items:stretch;gap:0;padding:0;overflow:hidden}
  .bw-content:has(>.fwk-wrapper)>.bw-offer-for img{width:100%;height:auto;aspect-ratio:3/2;border-radius:0}
  .bw-content:has(>.fwk-wrapper)>.bw-offer-for>div{padding:var(--space-md) var(--space-lg) var(--space-lg)}
}

/* Team member pages: the heading on the left, the sheet on the right */
@media (min-width:1001px){
  .bw-profile-form .bw-content:has(.fwk-wrapper){display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);column-gap:var(--gap-columns);align-items:start}
  .bw-profile-form .bw-content:has(.fwk-wrapper)>h2{margin:0;text-wrap:balance}
  .bw-profile-form .bw-content:has(.fwk-wrapper)>.bw-form{max-width:none}
}

/* Listing pages: the sheet is the one layer, so the tinted panel the old form sat in goes */
.bw .bw-enquire .bw-form:has(.fwk-wrapper){padding:0;background:none;border-radius:0}

/* The sheet */
.bw .fwk-wrapper{max-width:none;padding:var(--space-xl);color:var(--color-sheet-ink);background:var(--color-sheet);border:1px solid var(--color-sheet-rule);border-radius:var(--radius-card);font:400 var(--text-md)/1.5 var(--font-body)}
.bw .fwk-wrapper .fwk-form{--fwk-primary:var(--color-sheet-action);--fwk-text:var(--color-sheet-ink);--fwk-muted:var(--color-sheet-muted);--fwk-border:var(--color-sheet-edge);--fwk-bg:var(--color-field);--fwk-error:var(--color-sheet-error);--fwk-error-bg:var(--color-sheet-error-bg);--fwk-radius:var(--radius-card);--fwk-gap:var(--space-lg);--fwk-focus:var(--color-sheet-focus)}
.bw .fwk-wrapper .fwk-fields{column-gap:var(--space-md);row-gap:var(--space-lg)}
@media (max-width:640px){.bw .fwk-wrapper{padding:var(--space-lg) var(--space-md)}}

/* The tracker: the current step named. On a phone only the current step keeps its name. */
.bw .fwk-steps{display:flex;align-items:center;gap:0;margin:0 0 var(--space-xl);padding:0 0 var(--space-lg);list-style:none;border-bottom:1px solid var(--color-sheet-rule)}
.bw .fwk-step{display:flex;flex:1 1 auto;align-items:center;gap:var(--space-xs);min-width:0;color:var(--color-sheet-muted);font:500 .9375rem/1.25 var(--font-body)}
.bw .fwk-step:last-child{flex:0 0 auto}
.bw .fwk-step:not(:last-child)::after{content:"";flex:1 1 var(--space-md);width:auto;min-width:var(--space-md);height:1px;margin:0 var(--space-xs);background:var(--color-sheet-rule)}
.bw .fwk-step-number{flex:0 0 auto;width:1.875rem;height:1.875rem;color:var(--color-sheet-muted);background:transparent;border:1.5px solid var(--color-sheet-edge);font:600 .9375rem/1 var(--font-body);font-variant-numeric:tabular-nums}
.bw .fwk-step-done .fwk-step-number{display:inline-grid;place-items:center;color:var(--color-sheet-action);background:transparent;border-color:var(--color-sheet-action);font-size:0}
.bw .fwk-step-done .fwk-step-number::after{content:"";width:.6rem;height:.3rem;margin-top:calc(var(--space-3xs) * -1);border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg)}
.bw .fwk-step-active{color:var(--color-sheet-ink);font-weight:600}
.bw .fwk-step-active .fwk-step-number{color:var(--color-on-dark);background:var(--color-sheet-action);border-color:var(--color-sheet-action)}
.bw .fwk-step-title{overflow-wrap:break-word;min-width:0}
@media (max-width:760px){.bw .fwk-step:not(.fwk-step-active) .fwk-step-title{display:none}}

/* A form title, where a page shows one (the pages give their own heading, so they mostly hide it) */
.bw .fwk-heading{margin-bottom:var(--space-lg)}
.bw .fwk-title{margin:0;color:var(--color-sheet-ink);font:700 var(--text-title)/1.2 var(--font-display);text-wrap:balance}
.bw .fwk-form-description{color:var(--color-sheet-muted)}

/* Sections and labels */
.bw .fwk-section-title{margin:var(--space-xl) 0 calc(var(--space-xs) * -1);padding:0;border:0;color:var(--color-sheet-ink);font:700 var(--text-title)/1.2 var(--font-display);text-wrap:balance}
.bw .fwk-fields>.fwk-field-section:first-child .fwk-section-title{margin-top:0}
.bw .fwk-section-description{margin:var(--space-2xs) 0 0;color:var(--color-sheet-muted);font-size:var(--text-md)}
.bw .fwk-label{margin-bottom:var(--space-xs);color:var(--color-sheet-ink);font:600 .9375rem/1.3 var(--font-body)}
.bw .fwk-required{color:var(--bw-accent);font-weight:600}
.bw .fwk-description,.bw .fwk-sublabel{color:var(--color-sheet-muted);font-size:var(--text-sm);line-height:1.4}
.bw .fwk-sublabel{margin-top:var(--space-2xs)}
.bw .fwk-html-content{max-width:60ch;color:var(--color-sheet-muted);font-size:var(--text-md);line-height:1.5}
.bw .fwk-html-content p{margin:0}

/* Text fields */
.bw .fwk-control,.bw .fwk-wrapper select.fwk-control,.bw .fwk-wrapper textarea.fwk-control{max-width:none;min-height:3rem;padding:var(--space-sm) var(--space-md);color:var(--color-sheet-ink);background:var(--color-field);border:1px solid var(--color-sheet-edge);border-radius:var(--radius-card);font:400 var(--text-md)/1.4 var(--font-body);transition:background-color var(--dur-micro) var(--ease-out),border-color var(--dur-micro) var(--ease-out)}
.bw .fwk-wrapper textarea.fwk-control{min-height:7.5rem}
.bw .fwk-control::placeholder{color:var(--color-sheet-muted);opacity:1}
@media (hover:hover){.bw .fwk-control:hover{background:var(--color-field-hover)}}
.bw .fwk-control:focus-visible{background:var(--color-field);border-color:var(--color-sheet-focus);outline:2px solid var(--color-sheet-focus);outline-offset:2px;box-shadow:none}
.bw .fwk-control[aria-invalid="true"]{background:var(--color-sheet-error-bg);border-color:var(--color-sheet-error)}
.bw .fwk-control[readonly]{background:var(--color-sheet)}
.bw .fwk-error-message{margin-top:var(--space-2xs);color:var(--color-sheet-error);font:500 var(--text-sm)/1.35 var(--font-body)}
.bw .fwk-has-error>.fwk-label,.bw .fwk-has-error>legend,.bw .fwk-has-error .fwk-fieldset>.fwk-label{color:var(--color-sheet-error)}
.bw .bw-money .fwk-control{min-height:3.5rem;font-size:var(--text-lg);font-weight:600;font-variant-numeric:tabular-nums}

/* Name: first and last side by side; first, middle and last across when the field has a middle name */
@media (min-width:641px){.bw .fwk-name-inputs:has(.fwk-name-4){grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Tap tiles in place of radio buttons and tick boxes */
.bw .fwk-choices-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr));gap:var(--space-xs)}
/* Five or ten tiles sit in one even row of five, never four and a stray one; on a phone an odd last tile takes the full width */
@media (min-width:641px) and (max-width:899px){
  .bw .fwk-choices-tiles:has(.fwk-choice:nth-child(5):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:900px){
  .bw .fwk-choices-tiles:has(.fwk-choice:nth-child(5):last-child),.bw .fwk-choices-tiles:has(.fwk-choice:nth-child(10):last-child){grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (max-width:640px){
  .bw .fwk-choices-tiles .fwk-choice:last-child:nth-child(odd){grid-column:1/-1}
}
.bw .fwk-choices-tiles .fwk-choice{display:flex;align-items:stretch}
.bw .fwk-choices-tiles .fwk-choice label{display:flex;flex:1 1 auto;align-items:center;justify-content:center;width:100%;min-height:3rem;padding:var(--space-sm) var(--space-md);color:var(--color-sheet-ink);background:var(--color-field);border:1px solid var(--color-sheet-edge);border-radius:var(--radius-card);box-shadow:none;font:500 var(--text-md)/1.25 var(--font-body);text-align:center;transition:background-color var(--dur-micro) var(--ease-out),border-color var(--dur-micro) var(--ease-out),color var(--dur-micro) var(--ease-out)}
@media (hover:hover){.bw .fwk-choices-tiles .fwk-choice input:not(:checked)+label:hover{background:var(--color-field-hover)}}
.bw .fwk-choices-tiles .fwk-choice input:checked+label{color:var(--color-on-dark);background:var(--color-sheet-action);border-color:var(--color-sheet-action);box-shadow:none;font-weight:600}
@media (hover:hover){.bw .fwk-choices-tiles .fwk-choice input:checked+label:hover{background:var(--color-sheet-action-hover)}}
.bw .fwk-choices-tiles .fwk-choice input:focus-visible+label{outline:2px solid var(--color-sheet-focus);outline-offset:2px;box-shadow:none}
/* The invisible input stays on top of its tile so a click always reaches it. Never move the tile on press: the label would rise above the input and swallow the click. */
.bw .fwk-choices-tiles .fwk-choice input{z-index:var(--z-base)}
.bw .fwk-choices-tiles .fwk-choice input:not(:checked):active+label{background:var(--color-field-hover)}
.bw .fwk-has-error .fwk-choices-tiles .fwk-choice label{border-color:var(--color-sheet-error)}

/* Property suggestions under the address field (includes/formwork-offer.php, assets/bw-formwork.js) */
.bw .bw-offer-for{transition:opacity var(--dur-short) var(--ease-out)}
.bw .bw-offer-for[data-stale]{opacity:.45}
.bw .bw-address-picker .fwk-input-wrap{position:relative}
.bw .bw-suggest{position:absolute;inset-inline:0;top:calc(100% + var(--space-2xs));z-index:var(--z-dropdown);margin:0;padding:var(--space-2xs);list-style:none;background:var(--color-field);border:1px solid var(--color-sheet-edge);border-radius:var(--radius-card);box-shadow:var(--shadow-pop)}
.bw .bw-suggest[hidden]{display:none}
.bw .bw-suggest li{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--space-md);align-items:baseline;margin:0;padding:var(--space-xs) var(--space-sm);border-radius:calc(var(--radius-card) - var(--space-2xs));color:var(--color-sheet-ink);cursor:pointer}
.bw .bw-suggest li[aria-selected="true"]{background:var(--color-field-hover)}
@media (hover:hover){.bw .bw-suggest li:hover{background:var(--color-field-hover)}}
.bw .bw-suggest-addr{grid-column:1;overflow-wrap:break-word;font-weight:600}
.bw .bw-suggest-flag{grid-column:2;grid-row:1;color:var(--color-sheet-muted);font-size:var(--text-sm)}
.bw .bw-suggest-meta{grid-column:1/-1;color:var(--color-sheet-muted);font-size:var(--text-sm)}

/* The Turnstile check carries its own wording, so its field label is kept for screen readers only */
.bw .fwk-field-captcha>.fwk-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Buttons: Back on the left, the one forward action on the right; stacked with the forward action first on a phone */
.bw .fwk-page-footer{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-md);margin-top:var(--space-xl);padding-top:var(--space-lg);border-top:1px solid var(--color-sheet-rule)}
.bw .fwk-button{min-height:3rem;padding:var(--space-sm) var(--space-lg);color:var(--color-on-dark);background:var(--color-sheet-action);border:1.5px solid var(--color-sheet-action);border-radius:var(--radius-card);filter:none;font:600 var(--text-md)/1.2 var(--font-body);transition:background-color var(--dur-short) var(--ease-out),border-color var(--dur-short) var(--ease-out),color var(--dur-short) var(--ease-out)}
.bw .fwk-next,.bw .fwk-submit{margin-left:auto}
@media (hover:hover){.bw .fwk-button:hover{filter:none;background:var(--color-sheet-action-hover);border-color:var(--color-sheet-action-hover)}}
.bw .fwk-button.fwk-prev{color:var(--color-sheet-ink);background:transparent;border-color:var(--color-sheet-edge)}
@media (hover:hover){.bw .fwk-button.fwk-prev:hover{color:var(--color-sheet-ink);background:var(--color-field-hover);border-color:var(--color-sheet-edge)}}
.bw .fwk-button:focus-visible{outline:2px solid var(--color-sheet-focus);outline-offset:2px;box-shadow:none}
.bw .fwk-button:active{transform:translateY(1px)}
.bw .fwk-button:disabled{opacity:.55;cursor:not-allowed}
.bw .fwk-form.fwk-busy .fwk-button:disabled{cursor:progress}
.bw .fwk-form.fwk-busy{opacity:1}
@media (max-width:640px){
  .bw .fwk-page-footer{flex-direction:column-reverse;align-items:stretch}
  .bw .fwk-next,.bw .fwk-submit,.bw .fwk-button.fwk-prev{width:100%;margin-left:0}
}

/* Sent, and the notices around it */
.bw .fwk-confirmation{position:relative;display:flex;align-items:center;min-height:2.5rem;padding:0 0 0 calc(2.5rem + var(--space-md));color:var(--color-sheet-ink);background:none;border:0;border-radius:0;font-size:var(--text-lead);font-weight:500;line-height:1.35;text-wrap:balance}
.bw .fwk-confirmation>*{margin:0}
/* No box inside the sheet: the words, with a navy tick drawn like the finished steps in the tracker */
.bw .fwk-confirmation::before{content:"";position:absolute;left:0;top:50%;width:2.5rem;height:2.5rem;border:1.5px solid var(--color-sheet-action);border-radius:50%;transform:translateY(-50%)}
.bw .fwk-confirmation::after{content:"";position:absolute;left:.8125rem;top:50%;width:.875rem;height:.4375rem;border-left:2px solid var(--color-sheet-action);border-bottom:2px solid var(--color-sheet-action);transform:translateY(-75%) rotate(-45deg)}
.bw .fwk-notice-error,.bw .fwk-validation-summary{color:var(--color-sheet-error);background:var(--color-sheet-error-bg);border-color:var(--color-sheet-error)}
.bw .fwk-closed,.bw .fwk-notice{color:var(--color-sheet-ink);background:var(--color-field);border:1px solid var(--color-sheet-rule)}

/* Each step arrives with one short fade; nothing moves for people who ask for less motion */
@media (prefers-reduced-motion:no-preference){
  .bw .fwk-page:not([hidden]){animation:bw-fwk-in var(--dur-long) var(--ease-out) both}
}
@keyframes bw-fwk-in{from{opacity:0;transform:translateY(var(--space-xs))}}
@media (prefers-reduced-motion:reduce){
  .bw .fwk-wrapper *{transition:none;animation:none}
}
