/* Content-sized panels: preserve copy, controls and reading order. */
body main :is(.service-practice__shell,.content-guide-note) {
  width:min(calc(100% - var(--bv-gutter,24px) * 2),var(--bv-content-width,1176px));
  max-width:var(--bv-content-width,1176px); box-sizing:border-box;
}
body main :is(.lp-section-head,.drill-section-head,.method-fit__head,
 .method-scope__head,.depth-fit__head,.depth-process__head,.service-practice__head) {
  align-items:start;
}
body main :is(.sp-card,.sp-steps article,.rp-symptom-grid button,.rp-method-grid article,
 .rp-acceptance>div,.rp-check-result,.system-map__detail,.bv-review-card) {
  min-height:0;
}
body main .bv-review-card blockquote { flex:0 0 auto; }
body main .bv-review-card__footer { margin-top:auto; }
body main :is(.system-map,.system-price__layout,.depth-guide__grid) { align-items:start; }
body main .system-map__detail { justify-content:flex-start; }
body main .source-budget__grid { grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:28px; }

/* A short question heading should not occupy a tall empty sidebar. */
body main :is(.method-faq__layout,.setup-faq__layout,.ab-faq-layout,.home-faq-grid),
body main #questions>.lp-two-col,
body main #questions>.container-bv.lp-two-col {
  grid-template-columns:minmax(0,1fr); gap:24px; align-items:start;
}
body main :is(.method-faq__head,.setup-faq .wl-intro,.ab-faq-layout>div:first-child,
 .home-faq-grid>div:first-child) { position:static; max-width:850px; }
body main :is(.method-faq__list,.setup-faq .wl-faq,.lp-faq) { max-width:none; width:100%; }

/* Give the questionnaire a full row rather than a long, sparse split. */
body main .qc-layout { grid-template-columns:minmax(0,1fr); gap:24px; }
body main .qc-editorial { position:static; padding-top:0; }
body main .qc-editorial h2 { max-width:850px; margin-top:12px; }
body main .qc-editorial>p { max-width:78ch; margin-top:14px; }
body main .qc-editorial-rule { max-width:none; display:grid; grid-template-columns:25px 1fr 25px 1fr; gap:12px; margin-top:18px; padding-top:14px; }
body main .qc-editorial>small { max-width:78ch; margin-top:12px; }
body main .qc-purpose { max-width:none; margin-top:16px; }
body main .qc-questions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
body main .qc-questions fieldset { border-bottom:0; padding:16px 0; }
body main .qc-questions legend { align-items:flex-start; min-height:48px; }
body main .qc-options { margin-left:0; gap:6px; }
body main .qc-options label span { min-width:62px; padding:10px 12px; }
body main .qc-result { margin-top:10px; }
body main .rp-check-result { align-self:start; }

/* Keep scope and price panels fitted to their own content. */
body main .repair-scope .repair-scope__grid { grid-template-columns:minmax(0,1fr); gap:16px; align-items:start; }
body main .repair-scope .repair-scope__card {
  display:grid; grid-template-columns:minmax(170px,.38fr) minmax(0,1fr);
  gap:24px; align-items:start; min-height:0;
}
body main .repair-scope .repair-scope__card h3 { margin:0; }
body main .repair-scope .repair-scope__card ol { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 24px; margin:0; }
body main .repair-scope .repair-scope__card li { margin:0; padding-block:0; }
body main .repair-budget .repair-budget__layout { grid-template-columns:minmax(0,1fr); gap:24px; align-items:start; }
body main .repair-budget .repair-budget__order { grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
body main .repair-budget .lp-price-card { display:grid; grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr); gap:10px 28px; align-content:start; height:auto; min-height:0; }
body main .repair-budget .lp-price-card>span { grid-column:1; grid-row:1; }
body main .repair-budget .lp-price-card>strong { grid-column:1; grid-row:2; margin:0; }
body main .repair-budget .lp-price-card>p { grid-column:2; grid-row:1/3; margin:0; align-self:center; }
body main .repair-budget .lp-price-card>div { grid-column:1/-1; margin-top:8px; padding-top:16px; }

/* Acceptance becomes compact rows with a clear result column. */
body main .setup-handover .setup-handover__grid { grid-template-columns:minmax(0,1fr); gap:14px; align-items:start; }
body main .setup-handover .setup-handover__card { display:grid; grid-template-columns:minmax(0,.7fr) minmax(0,1.2fr) minmax(0,1fr); gap:24px; align-items:start; min-height:0; padding:22px; }
body main .setup-handover__heading>span { color:#8b6a30; font-size:11px; font-weight:800; text-transform:uppercase; }
body main .setup-handover .setup-handover__card h3 { margin:10px 0 0; }
body main .setup-handover .setup-handover__card>p { margin:0; font-size:14px; line-height:1.65; }
body main .setup-handover .setup-handover__card>div:not(.setup-handover__heading) { margin:0; padding:0 0 0 20px; border-top:0; border-left:1px solid #d5dfdb; }
body main .setup-handover .setup-handover__card>div:not(.setup-handover__heading) p { font-size:14px; line-height:1.65; }

/* Forms keep their useful fields and spend space on the fields, not an empty rail. */
body main :is(#request,#brief) :is(.sv-request-grid,.wl-request-grid,.rp-request-grid,.lp-two-col),
body main :is(.cp-brief-grid,.home-request-grid) { grid-template-columns:minmax(0,1fr); gap:24px; align-items:start; }
body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card) { min-width:0; width:100%; height:auto; }
body main :is(.lp-brief-fields,.cp-brief-fields) { grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
body main :is(.lp-brief-fields,.cp-brief-fields)>label,
body main :is(.lp-brief-fields,.cp-brief-fields)>label:last-child:nth-child(odd),
.repair-ui .repair-request .lp-brief-fields>label:first-child { grid-column:auto; }
body main .repair-request-help ol { grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
body main .repair-request-help { margin-top:18px; padding-top:18px; }
body main :is(.sv-request-grid,.wl-request-grid,.rp-request-grid)>div:first-child { min-width:0; }
body main :is(.sv-request-grid,.wl-request-grid,.rp-request-grid) :is(h2,.wl-intro>p) { max-width:850px; }
body main .home-request-intro .home-request-note { max-width:none; }
body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card)>.bv-lead {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,.65fr); gap:12px 20px; align-items:end;
}
body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card)>.bv-lead .bv-lead__title,
body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card)>.bv-lead .bv-lead__status { grid-column:1/-1; }
body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card)>.bv-lead .bv-lead__agree { grid-column:auto; min-width:0; margin:0; align-self:end; }
body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card)>.bv-lead .bv-lead__send { grid-column:1/-1; margin-top:0; }

/* Keep a usable rhythm and touch targets when the content stacks. */
@media(max-width:1000px) {
  body main .qc-questions { grid-template-columns:minmax(0,1fr); gap:0; }
  body main .qc-questions fieldset { border-bottom:1px solid #dce5e3; padding:18px 0; }
  body main .qc-questions fieldset:last-child { border-bottom:0; }
  body main .qc-questions legend { min-height:0; }
  body main .qc-editorial-rule { display:none; }
  body main .setup-handover .setup-handover__card { grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr); gap:18px 22px; }
  body main .setup-handover .setup-handover__card>div:not(.setup-handover__heading) { grid-column:2; border-left:0; border-top:1px solid #d5dfdb; padding:14px 0 0; }
  body main .source-budget__grid { grid-template-columns:minmax(0,1fr); gap:24px; }
}
@media(max-width:700px) {
  body main .repair-scope .repair-scope__card,
  body main .repair-budget .repair-budget__order,
  body main .repair-budget .lp-price-card,
  body main .setup-handover .setup-handover__card,
  body main .repair-request-help ol,
  body main :is(.lp-brief-fields,.cp-brief-fields),
  body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card)>.bv-lead {
    grid-template-columns:minmax(0,1fr);
  }
  body main .repair-scope .repair-scope__card ol { grid-template-columns:minmax(0,1fr); gap:14px; }
  body main .repair-budget .lp-price-card>:is(span,strong,p,div) { grid-column:auto; grid-row:auto; align-self:start; }
  body main .repair-budget .lp-price-card>p { margin-top:8px; }
  body main .setup-handover .setup-handover__card>div:not(.setup-handover__heading) { grid-column:auto; }
  body main .setup-handover .setup-handover__card h3 { margin-bottom:0; }
  body main .qc-card { padding:20px; }
  body main .qc-options label span { min-height:44px; }
  body main :is(.method-faq__layout,.setup-faq__layout,.ab-faq-layout,.home-faq-grid) { gap:18px; }
  body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card)>.bv-lead .bv-lead__send { grid-column:1; min-height:48px; }
}

body main .setup-handover .setup-handover__card>.setup-handover__heading { margin:0; padding:0; border:0; }
body main .rp-split { grid-template-columns:minmax(0,1fr); gap:24px; }
body main .rp-steps { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 28px; }
@media(max-width:1000px) {
 body main .repair-scope .repair-scope__card { grid-template-columns:minmax(0,1fr); gap:16px; }
 body main .system-price__layout,
 body main .sv-handover-layout { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:900px) {
 .v2 main .home-service-card,
 .v2 main .home-service-card:nth-child(2) { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:700px) { body main .rp-steps { grid-template-columns:minmax(0,1fr); } }

/* Compact request panels, keeping all existing fields and sending behaviour. */
body main :is(.sv-request-grid,.wl-request-grid,.rp-request-grid,.cp-brief-grid,.home-request-grid),
body main :is(#request,#brief)>.lp-two-col,
body main :is(#request,#brief)>.container-bv.lp-two-col { max-width:960px; margin-inline:auto; gap:20px; }
body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card) {
 max-width:960px; padding:22px; margin-inline:auto; box-sizing:border-box;
}
body main :is(.lp-brief-fields,.cp-brief-fields) { gap:14px; }
body main .request-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:12px; }
body main .wl-request-card .request-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
body main .request-fields__field { min-width:0; }
body main .request-fields__field--wide { grid-column:1/-1; }
body main .request-fields__field>label { display:block; margin:0 0 7px; font-size:13px; line-height:1.4; }
body main .request-fields__field>:is(input,select,textarea) { box-sizing:border-box; width:100%; margin:0; font-size:16px; }
body main .request-fields__field>:is(input,select) { min-height:44px; padding:10px 12px; }
body main .request-fields__field>textarea { height:96px; min-height:96px; padding:10px 12px; resize:vertical; }
body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card)>.bv-lead.bv-lead {
 margin-top:16px; padding:16px 0 0; border:0; border-top:1px solid #d3dedb; border-radius:0; background:transparent;
 gap:12px 18px;
}
body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card)>.bv-lead .bv-lead__title { display:none; }
body main .bv-lead__status:empty { display:none; }
body main :is(.wl-request-grid,.rp-request-grid)>div:first-child>ul { display:flex; flex-wrap:wrap; gap:8px 24px; margin-top:16px; }
body main :is(.wl-request-grid,.rp-request-grid)>div:first-child>ul>li { flex:1 1 220px; margin:0; }

/* Make step numbers readable as markers rather than part of the paragraph. */
body main :is(.wl-handover-grid,.sv-handover-layout) li>span,
body main .rp-steps li>span,
body main :is(.construction-work__grid,.system-work__grid) li>span {
 display:inline-flex; align-items:center; justify-content:center; flex:0 0 38px;
 width:38px; height:38px; box-sizing:border-box; border:1px solid currentColor; border-radius:9px;
 font:700 17px/1 Inter,Arial,sans-serif; background:rgba(191,159,64,.08);
}
body main :is(.sv-handover-layout,.rp-steps) li { grid-template-columns:38px minmax(0,1fr); gap:16px; }
body main .wl-handover-grid li { gap:16px; padding:16px 20px; }
body main .wl-handover-grid li p { margin:0; font-size:14px; line-height:1.6; }
body main .content-guide-note { padding:18px 22px; margin-top:20px; }
body main .content-guide-note h3 { margin-bottom:8px; }
body main .content-guide-note p { line-height:1.6; }
@media(max-width:700px) {
 body main .request-fields,
 body main .wl-request-card .request-fields { grid-template-columns:minmax(0,1fr); }
 body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card) { padding:18px; }
 body main .request-fields__field--wide { grid-column:auto; }
 body main .wl-handover-grid li { padding:16px; gap:12px; }
 body main .content-guide-note { padding:16px 18px; }
}

/* Empty legacy copy status must not reserve a blank row above the phone. */
body main .rp-request-card>#rpCopyStatus:empty { display:none; }
body main :is(.lp-brief,.cp-brief-form,.sv-request-form,.wl-request-card,.rp-request-card)>.bv-lead .bv-lead__field { margin:0; }
