/**
 * ASG Virtual Gutter Estimator — scoped styles.
 *
 * Design intent: premium property technology for a high-end local trade.
 * Clean white surfaces, ink typography, restrained teal, and orange reserved
 * strictly for the one action we want taken on each screen. Depth comes from
 * hairlines and a single soft shadow, not from gradients or glass.
 *
 * Deliberately absent: gradients, glassmorphism, coloured card grids, giant
 * icons, decorative shadows, and entrance animation on content. Motion is
 * limited to state changes the user caused.
 *
 * Everything is namespaced under .asg-vge so Breakdance and WordPress globals
 * are never touched, and no element selector escapes that scope. The estimator
 * styles the application; the Breakdance section around it keeps control of
 * page width, background, and vertical spacing.
 */

.asg-vge {
    /* Brand */
    --asg-teal: #2f7470;
    --asg-teal-soft: #e6f1ef;
    --asg-teal-deep: #235956;
    --asg-orange: #ff5a3c;
    --asg-orange-deep: #e2472b;

    /* Ink & neutrals */
    --asg-ink: #14161a;
    --asg-text: #34383f;
    --asg-muted: #6b7078;
    --asg-faint: #9aa0a8;
    --asg-line: #e4e6e9;
    --asg-hairline: #eef0f2;
    --asg-surface: #ffffff;
    --asg-surface-2: #f8f9fa;
    --asg-surface-3: #f2f4f5;

    /* Semantic */
    --asg-good: #1c7a45;
    --asg-good-soft: #e8f4ed;
    --asg-warn: #8a5a00;
    --asg-warn-soft: #fdf5e6;
    --asg-error: #b3261e;
    --asg-error-soft: #fdecea;

    /* Form */
    --asg-radius: 14px;
    --asg-radius-sm: 9px;
    --asg-radius-pill: 999px;
    --asg-field-h: 52px;
    --asg-focus: 0 0 0 3px rgba(47, 116, 112, 0.28);
    --asg-shadow: 0 1px 2px rgba(20, 22, 26, 0.04), 0 12px 32px -12px rgba(20, 22, 26, 0.14);

    --asg-gap: clamp(1rem, 2.2vw, 1.5rem);

    font-family: inherit;
    color: var(--asg-text);
    background: transparent;
    box-sizing: border-box;
    /* Contain any accidental overflow without clipping focus rings on
       elements that legitimately sit near the edge. */
    overflow-x: clip;
    /* Absorbs a sticky site header when we scroll a step into view. */
    scroll-margin-top: 100px;
}

.asg-vge *,
.asg-vge *::before,
.asg-vge *::after { box-sizing: border-box; }

/* The hidden attribute must beat every display rule below it. */
.asg-vge [hidden] { display: none !important; }

/* ------------------------------------------------------------------
 * Page-builder heading defence.
 *
 * Breakdance emits `.breakdance h1...h6` rules — and a heading-preset rule
 * of the same shape — from global-settings.css, which WordPress enqueues
 * after this file. Both have specificity (0,1,1). Every heading rule in
 * this stylesheet used to be (0,1,0) or (0,1,1), so Breakdance either won
 * outright or won the tie on source order, and it was setting the family,
 * size, weight, letter-spacing, and text-transform on every heading the
 * estimator renders: the launch H2 came out at 40px in Title Case instead
 * of the intended scale, and the explainer sub-headings at 25px.
 *
 * Doubling the scope class raises this to (0,2,1) so it wins on
 * specificity instead of on load order. Every individual heading rule
 * below is prefixed with `.asg-vge` for the same reason, and each sits
 * later in the file so it still beats this reset on the tie.
 *
 * Size is deliberately not set here — the per-element rules own the type
 * scale. Only the properties a page builder hijacks are neutralised.
 * ------------------------------------------------------------------ */
.asg-vge.asg-vge :is(h1, h2, h3, h4, h5, h6) {
    font-family: inherit;
    font-style: normal;
    text-transform: none;
    letter-spacing: normal;
}

.asg-vge__shell {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    background: var(--asg-surface);
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius);
    box-shadow: var(--asg-shadow);
    /* Reserve height so launch → app → result never jolts the page.
       This is the main CLS defence. */
    min-height: 520px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==================================================================
 * Launch
 * ================================================================ */

.asg-vge__launch {
    display: grid;
    grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
    gap: 0;
    flex: 1;
}

.asg-vge__launch-copy {
    padding: clamp(1.75rem, 3.6vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.asg-vge__eyebrow {
    margin: 0 0 0.85rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--asg-teal);
}

.asg-vge .asg-vge__title {
    margin: 0 0 0.85rem;
    color: var(--asg-ink);
    font-size: clamp(1.75rem, 3.4vw, 2.6rem);
    line-height: 1.12;
    letter-spacing: -0.022em;
    font-weight: 700;
    text-wrap: balance;
}

.asg-vge__accent { color: var(--asg-teal); }

.asg-vge__intro {
    margin: 0 0 1.35rem;
    font-size: clamp(0.95rem, 1.15vw, 1.0625rem);
    line-height: 1.62;
    color: var(--asg-muted);
    max-width: 46ch;
}

.asg-vge__trust {
    margin: 0 0 1.6rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
    border-top: 1px solid var(--asg-hairline);
    padding-top: 1.1rem;
}

.asg-vge__trust li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--asg-text);
}

/* A hairline tick drawn in CSS: no icon font, no SVG request. */
.asg-vge__trust li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.42em;
    width: 0.42rem;
    height: 0.72rem;
    border-right: 2px solid var(--asg-teal);
    border-bottom: 2px solid var(--asg-teal);
    transform: rotate(42deg);
}

.asg-vge__cta-row {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.asg-vge__phone-link {
    /* A standalone action, not an inline link — so it gets a real target
       area rather than relying on the inline-link exception in WCAG 2.5.8. */
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--asg-teal);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.asg-vge__phone-link:hover { border-bottom-color: currentColor; }
.asg-vge__phone-link:focus-visible {
    outline: none;
    box-shadow: var(--asg-focus);
    border-radius: var(--asg-radius-sm);
}

.asg-vge__micro {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--asg-faint);
    max-width: 52ch;
}

/* Action panel */
.asg-vge__panel {
    background: var(--asg-surface-2);
    border-left: 1px solid var(--asg-line);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.asg-vge__panel-label {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--asg-ink);
}

.asg-vge__services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.asg-vge__service {
    appearance: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    padding: 0.7rem 0.85rem;
    min-height: 48px;
    background: var(--asg-surface);
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius-sm);
    color: var(--asg-text);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}
.asg-vge__service:hover {
    border-color: var(--asg-teal);
    color: var(--asg-teal-deep);
}
.asg-vge__service:focus-visible {
    outline: none;
    border-color: var(--asg-teal);
    box-shadow: var(--asg-focus);
}
.asg-vge__service[aria-pressed="true"] {
    background: var(--asg-teal);
    border-color: var(--asg-teal);
    color: #fff;
}

.asg-vge__panel-hint {
    margin: 0.9rem 0 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--asg-faint);
}

/* ==================================================================
 * App shell
 * ================================================================ */

.asg-vge__app {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.asg-vge__appbar {
    padding: clamp(1.1rem, 2.4vw, 1.6rem) clamp(1.25rem, 3.2vw, 2.5rem) 0;
    border-bottom: 1px solid var(--asg-hairline);
}

/* Five calm stages, not a ladder of micro-steps. */
.asg-vge__stages {
    display: flex;
    gap: clamp(0.6rem, 2vw, 1.75rem);
    margin: 0 0 0.85rem;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}
.asg-vge__stages::-webkit-scrollbar { display: none; }

.asg-vge__stage {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--asg-faint);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.asg-vge__stage::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--asg-line);
    flex: 0 0 auto;
    transition: background-color 0.2s ease;
}
.asg-vge__stage.is-done { color: var(--asg-muted); }
.asg-vge__stage.is-done::before { background: var(--asg-teal); }
.asg-vge__stage.is-current { color: var(--asg-ink); }
.asg-vge__stage.is-current::before {
    background: var(--asg-orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 60, 0.16);
}

.asg-vge__bar {
    height: 3px;
    background: var(--asg-hairline);
    border-radius: var(--asg-radius-pill);
    overflow: hidden;
    margin-bottom: clamp(1rem, 2.2vw, 1.4rem);
}
.asg-vge__bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--asg-teal);
    border-radius: inherit;
    transition: width 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.asg-vge__form {
    padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1.25rem, 3.2vw, 2.5rem);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.asg-vge__stepwrap { flex: 1; }

/* ==================================================================
 * Steps & fields
 * ================================================================ */

.asg-vge__step-head { margin-bottom: clamp(1.15rem, 2.4vw, 1.65rem); }

.asg-vge .asg-vge__step-title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    line-height: 1.24;
    letter-spacing: -0.015em;
    font-weight: 700;
    color: var(--asg-ink);
}
.asg-vge .asg-vge__step-title:focus { outline: none; }
.asg-vge .asg-vge__step-title:focus-visible {
    outline: 2px solid var(--asg-teal);
    outline-offset: 4px;
    border-radius: 4px;
}

.asg-vge__step-sub {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--asg-muted);
    max-width: 58ch;
}

.asg-vge__fields {
    display: grid;
    gap: clamp(1rem, 2vw, 1.35rem);
}

/* The lead-capture step gets a two-up grid on wider screens: four fields in
   two rows reads as a short form, four stacked reads as a long one. */
.asg-vge__fields--lead { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.asg-vge__fields--lead .asg-vge__field--wide { grid-column: 1 / -1; }

.asg-vge__field { min-width: 0; }

.asg-vge__label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--asg-ink);
}

.asg-vge__optional {
    font-weight: 500;
    color: var(--asg-faint);
    letter-spacing: 0;
}

.asg-vge__input,
.asg-vge__select,
.asg-vge__textarea {
    width: 100%;
    font: inherit;
    font-size: 1rem; /* 16px minimum: stops iOS zooming the page on focus */
    line-height: 1.4;
    color: var(--asg-ink);
    background: var(--asg-surface);
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius-sm);
    padding: 0 0.9rem;
    height: var(--asg-field-h);
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
    appearance: none;
    -webkit-appearance: none;
}

.asg-vge__textarea {
    height: auto;
    min-height: 118px;
    padding: 0.8rem 0.9rem;
    resize: vertical;
    line-height: 1.6;
}

.asg-vge__select {
    background-image: linear-gradient(45deg, transparent 50%, var(--asg-muted) 50%),
                      linear-gradient(135deg, var(--asg-muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 22px, calc(100% - 13px) 22px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.4rem;
}

.asg-vge__input:hover,
.asg-vge__select:hover,
.asg-vge__textarea:hover { border-color: #cdd1d6; }

.asg-vge__input:focus,
.asg-vge__select:focus,
.asg-vge__textarea:focus {
    outline: none;
    border-color: var(--asg-teal);
    box-shadow: var(--asg-focus);
}

.asg-vge__input[aria-invalid="true"],
.asg-vge__textarea[aria-invalid="true"],
.asg-vge__select[aria-invalid="true"] { border-color: var(--asg-error); }

.asg-vge__help {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--asg-muted);
}

.asg-vge__error {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--asg-error);
}

/* Address field with suggestion list */
.asg-vge__address { position: relative; }

.asg-vge__suggest {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 4px);
    z-index: 30;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: var(--asg-surface);
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius-sm);
    box-shadow: 0 10px 28px -10px rgba(20, 22, 26, 0.22);
    max-height: 250px;
    overflow-y: auto;
}
.asg-vge__suggest li { margin: 0; }
.asg-vge__suggest button {
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.45;
    padding: 0.6rem 0.7rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--asg-text);
    cursor: pointer;
}
.asg-vge__suggest button:hover,
.asg-vge__suggest button:focus-visible,
.asg-vge__suggest button[aria-selected="true"] {
    background: var(--asg-teal-soft);
    color: var(--asg-teal-deep);
    outline: none;
}

.asg-vge__suggest button strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--asg-ink);
    line-height: 1.3;
}
.asg-vge__suggest button span {
    display: block;
    font-size: 0.75rem;
    color: var(--asg-muted);
    line-height: 1.4;
}
.asg-vge__suggest button:hover strong,
.asg-vge__suggest button:focus-visible strong,
.asg-vge__suggest button[aria-selected="true"] strong { color: var(--asg-teal-deep); }

/* Confirmation line under the address, once Google has resolved it. */
.asg-vge__address-confirm {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0.45rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    font-weight: 600;
}
.asg-vge__address-confirm.is-good { color: var(--asg-good); }
.asg-vge__address-confirm.is-warn { color: var(--asg-warn); font-weight: 500; }
.asg-vge__address-confirm::before {
    content: "";
    flex: 0 0 auto;
    width: 0.4rem;
    height: 0.7rem;
    margin-top: 0.28em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(42deg);
}
/* An out-of-area notice is information, not an achievement — no tick. */
.asg-vge__address-confirm.is-warn::before {
    width: 0.7rem;
    height: 0;
    margin-top: 0.62em;
    border-right: 0;
    border-bottom: 2px solid currentColor;
    transform: none;
}

/* Address confirmation thumbnail.
 * A static satellite image instead of the Maps JavaScript bundle — same
 * reassurance, a fraction of the weight, and no Google key in the page. */
.asg-vge__address-thumb {
    margin: 0.6rem 0 0;
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius-sm);
    overflow: hidden;
    background: var(--asg-surface-3);
}
.asg-vge__address-thumb img {
    display: block;
    width: 100%;
    height: auto;
    /* Reserved so the image arriving can never push the form around. */
    aspect-ratio: 480 / 220;
    object-fit: cover;
}
.asg-vge__address-thumb figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.5rem 0.7rem;
    background: var(--asg-surface-2);
    border-top: 1px solid var(--asg-line);
}
.asg-vge__address-thumb figcaption span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--asg-ink);
}
/* Google Maps Platform requires this credit to stay visible. */
.asg-vge__address-thumb figcaption small {
    font-size: 0.6875rem;
    color: var(--asg-faint);
}

/* Choice / multi chips */
.asg-vge__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.asg-vge__chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 46px;
    padding: 0.55rem 1rem;
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius-pill);
    background: var(--asg-surface);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--asg-text);
    cursor: pointer;
    transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

/* The real input stays in the accessibility tree and keeps keyboard
   behaviour; it is only visually replaced by the chip. */
.asg-vge__chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.asg-vge__chip:hover { border-color: var(--asg-teal); color: var(--asg-teal-deep); }
.asg-vge__chip:has(input:focus-visible) {
    border-color: var(--asg-teal);
    box-shadow: var(--asg-focus);
}
.asg-vge__chip:has(input:checked) {
    background: var(--asg-teal);
    border-color: var(--asg-teal);
    color: #fff;
}

/* Consent */
.asg-vge__consent {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    background: var(--asg-surface-2);
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius-sm);
}
.asg-vge__consent input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--asg-teal);
}
.asg-vge__consent label {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--asg-text);
    cursor: pointer;
}

/* Trust note under the lead-capture form */
.asg-vge__trustnote {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-top: 0.35rem;
    padding: 0.85rem 1rem;
    background: var(--asg-teal-soft);
    border-radius: var(--asg-radius-sm);
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--asg-teal-deep);
}
.asg-vge__trustnote::before {
    content: "";
    flex: 0 0 auto;
    width: 14px;
    height: 16px;
    margin-top: 1px;
    background: currentColor;
    /* A padlock, drawn as a mask — no image request, inherits the text color. */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16'%3E%3Cpath d='M3 7V4.5a4 4 0 0 1 8 0V7h.5A1.5 1.5 0 0 1 13 8.5v6A1.5 1.5 0 0 1 11.5 16h-9A1.5 1.5 0 0 1 1 14.5v-6A1.5 1.5 0 0 1 2.5 7H3zm2 0h4V4.5a2 2 0 1 0-4 0V7z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16'%3E%3Cpath d='M3 7V4.5a4 4 0 0 1 8 0V7h.5A1.5 1.5 0 0 1 13 8.5v6A1.5 1.5 0 0 1 11.5 16h-9A1.5 1.5 0 0 1 1 14.5v-6A1.5 1.5 0 0 1 2.5 7H3zm2 0h4V4.5a2 2 0 1 0-4 0V7z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ==================================================================
 * Photos
 * ================================================================ */

.asg-vge__photo-guide {
    margin: 0 0 0.85rem;
    padding: 0.85rem 1rem;
    list-style: none;
    background: var(--asg-surface-2);
    border-radius: var(--asg-radius-sm);
    display: grid;
    gap: 0.35rem;
}
.asg-vge__photo-guide li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--asg-muted);
}
.asg-vge__photo-guide li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--asg-teal);
}

.asg-vge__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 128px;
    padding: 1.25rem;
    border: 1.5px dashed var(--asg-line);
    border-radius: var(--asg-radius-sm);
    background: var(--asg-surface-2);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.14s ease, background-color 0.14s ease;
}
.asg-vge__drop:hover,
.asg-vge__drop.is-drag {
    border-color: var(--asg-teal);
    background: var(--asg-teal-soft);
}
.asg-vge__drop:has(input:focus-visible) {
    border-color: var(--asg-teal);
    box-shadow: var(--asg-focus);
}
.asg-vge__drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.asg-vge__drop strong {
    font-size: 0.9375rem;
    color: var(--asg-teal-deep);
}
.asg-vge__drop small {
    font-size: 0.75rem;
    color: var(--asg-faint);
}

.asg-vge__photo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 0.6rem;
    margin: 0.85rem 0 0;
    padding: 0;
    list-style: none;
}

.asg-vge__photo {
    position: relative;
    border-radius: var(--asg-radius-sm);
    overflow: hidden;
    border: 1px solid var(--asg-line);
    background: var(--asg-surface-3);
    aspect-ratio: 4 / 3;
}
.asg-vge__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.asg-vge__photo-name {
    position: absolute;
    inset: auto 0 0 0;
    padding: 0.3rem 0.45rem;
    font-size: 0.6875rem;
    line-height: 1.3;
    color: #fff;
    background: rgba(20, 22, 26, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.asg-vge__photo-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 22, 26, 0.78);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.asg-vge__photo-remove:hover { background: var(--asg-error); }
.asg-vge__photo-remove:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -3px;
}

/* Per-file upload progress */
.asg-vge__photo-bar {
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
}
.asg-vge__photo-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--asg-teal);
    transition: width 0.2s linear;
}

/* ==================================================================
 * Property analysis
 * ================================================================ */

.asg-vge__analysis {
    margin-top: clamp(1.1rem, 2.4vw, 1.5rem);
    padding: 1.1rem 1.25rem;
    background: var(--asg-surface-2);
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius-sm);
    /* Reserved so the panel appearing never moves the buttons under a
       thumb that is already travelling toward them. */
    min-height: 168px;
}

.asg-vge__analysis-title {
    margin: 0 0 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--asg-muted);
}

.asg-vge__analysis-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.asg-vge__analysis-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--asg-text);
}

.asg-vge__analysis-list li::before {
    content: "";
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border-radius: 50%;
    border: 2px solid var(--asg-line);
}

/* Done: a real tick, only when the step actually succeeded. */
.asg-vge__analysis-list li.is-done { color: var(--asg-ink); }
.asg-vge__analysis-list li.is-done::before {
    border-color: var(--asg-good);
    background: var(--asg-good);
    -webkit-mask: none;
    box-shadow: inset 0 0 0 2px var(--asg-good);
}
.asg-vge__analysis-list li.is-done::after {
    content: "";
    position: absolute;
    margin: 6px 0 0 5px;
    width: 4px;
    height: 8px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(42deg);
}
.asg-vge__analysis-list li { position: relative; }

.asg-vge__analysis-list li.is-running { color: var(--asg-muted); }
.asg-vge__analysis-list li.is-running::before {
    border-color: var(--asg-teal);
    border-top-color: transparent;
    animation: asg-vge-spin 0.85s linear infinite;
}

/* Not available: an honest neutral dash, never a false green tick. */
.asg-vge__analysis-list li.is-none { color: var(--asg-faint); }
.asg-vge__analysis-list li.is-none::before {
    border-style: solid;
    border-color: var(--asg-line);
    background: var(--asg-line);
    width: 16px;
    height: 16px;
    border-radius: 50%;
}
.asg-vge__analysis-list li.is-none::after {
    content: "";
    position: absolute;
    margin: 7px 0 0 4px;
    width: 8px;
    height: 2px;
    background: var(--asg-faint);
}

@keyframes asg-vge-spin { to { transform: rotate(360deg); } }

.asg-vge__analysis-note {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--asg-faint);
}

/* ==================================================================
 * Buttons & navigation
 * ================================================================ */

.asg-vge__btn {
    appearance: none;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.005em;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 50px;
    padding: 0 1.5rem;
    border-radius: var(--asg-radius-pill);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}
.asg-vge__btn:active { transform: translateY(1px); }
.asg-vge__btn:focus-visible { outline: none; box-shadow: var(--asg-focus); }
.asg-vge__btn[disabled] { opacity: 0.6; cursor: default; transform: none; }

.asg-vge__btn--lg { min-height: 56px; padding: 0 1.9rem; font-size: 1rem; }

/* Orange is reserved for the single highest-value action on a screen. */
.asg-vge__btn--primary {
    background: var(--asg-orange);
    color: #fff;
}
.asg-vge__btn--primary:hover { background: var(--asg-orange-deep); }

.asg-vge__btn--ghost {
    background: transparent;
    border-color: var(--asg-line);
    color: var(--asg-text);
}
.asg-vge__btn--ghost:hover { border-color: var(--asg-ink); color: var(--asg-ink); }

.asg-vge__btn--ink {
    background: var(--asg-ink);
    color: #fff;
}
.asg-vge__btn--ink:hover { background: #000; }

.asg-vge__btn--quiet {
    background: transparent;
    color: var(--asg-muted);
    border-color: transparent;
    font-weight: 600;
    min-height: 42px;
    padding: 0 0.9rem;
}
.asg-vge__btn--quiet:hover { color: var(--asg-ink); }

.asg-vge__nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-top: clamp(1.25rem, 2.6vw, 1.8rem);
    padding-top: clamp(1rem, 2.2vw, 1.35rem);
    border-top: 1px solid var(--asg-hairline);
}
.asg-vge__nav .asg-vge__btn--primary { min-width: 190px; }

.asg-vge__nav-note {
    margin: 0.65rem 0 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--asg-faint);
    text-align: right;
}

.asg-vge__status {
    margin: 0 clamp(1.25rem, 3.2vw, 2.5rem);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--asg-muted);
    min-height: 1.4em; /* reserved so a message never shifts layout */
}
.asg-vge__status.is-error {
    color: var(--asg-error);
    font-weight: 600;
}

/* ==================================================================
 * Result
 * ================================================================ */

.asg-vge__result {
    padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1.25rem, 3.2vw, 2.5rem) clamp(1.75rem, 3.4vw, 2.5rem);
    scroll-margin-top: 100px;
}
.asg-vge__result:focus { outline: none; }

.asg-vge__hero {
    padding: clamp(1.4rem, 3vw, 2.1rem);
    background: var(--asg-ink);
    border-radius: var(--asg-radius);
    color: #fff;
    margin-bottom: clamp(1.1rem, 2.4vw, 1.6rem);
}

.asg-vge__hero-kicker {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.asg-vge__hero-range {
    margin: 0 0 0.5rem;
    font-size: clamp(2.15rem, 6.2vw, 3.5rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.asg-vge__hero-range--review {
    font-size: clamp(1.3rem, 3.2vw, 1.85rem);
    line-height: 1.24;
    letter-spacing: -0.015em;
}

.asg-vge__hero-service {
    margin: 0 0 0.9rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}

.asg-vge__hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.asg-vge__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.75rem;
    border-radius: var(--asg-radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.asg-vge__pill--high { background: rgba(46, 160, 100, 0.26); }
.asg-vge__pill--medium { background: rgba(255, 255, 255, 0.14); }
.asg-vge__pill--limited,
.asg-vge__pill--onsite_required { background: rgba(255, 160, 60, 0.22); }

.asg-vge__hero-basis {
    margin: 0;
    flex: 1 1 260px;
    min-width: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.68);
}

/* Key numbers strip */
.asg-vge__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    background: var(--asg-line);
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius-sm);
    overflow: hidden;
    margin-bottom: clamp(1.1rem, 2.4vw, 1.6rem);
}
.asg-vge__metric {
    background: var(--asg-surface);
    padding: 0.95rem 1.1rem;
}
.asg-vge__metric dt {
    margin: 0 0 0.28rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--asg-faint);
}
.asg-vge__metric dd {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--asg-ink);
    font-variant-numeric: tabular-nums;
}

/* Conversion panel */
.asg-vge__next {
    padding: clamp(1.15rem, 2.6vw, 1.6rem);
    background: var(--asg-teal-soft);
    border-radius: var(--asg-radius-sm);
    margin-bottom: clamp(1.1rem, 2.4vw, 1.6rem);
}
.asg-vge__next-title {
    margin: 0 0 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--asg-teal-deep);
}
.asg-vge__next p {
    margin: 0 0 1.05rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--asg-text);
    max-width: 62ch;
}
.asg-vge__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.asg-vge__review-flag {
    padding: 0.9rem 1.1rem;
    margin-bottom: clamp(1.1rem, 2.4vw, 1.6rem);
    background: var(--asg-warn-soft);
    border-left: 3px solid var(--asg-warn);
    border-radius: 0 var(--asg-radius-sm) var(--asg-radius-sm) 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--asg-warn);
    font-weight: 600;
}

/* Detail columns */
.asg-vge__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1.1rem, 2.6vw, 2rem);
}

.asg-vge__section + .asg-vge__section { margin-top: 1.4rem; }

.asg-vge .asg-vge__section h4 {
    margin: 0 0 0.6rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--asg-hairline);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--asg-faint);
}

.asg-vge__rows { margin: 0; }
.asg-vge__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--asg-hairline);
}
.asg-vge__row dt {
    font-size: 0.8125rem;
    color: var(--asg-muted);
    flex: 1 1 auto;
    min-width: 0;
}
.asg-vge__row dd {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--asg-ink);
    text-align: right;
    flex: 0 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.asg-vge__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}
.asg-vge__list li {
    position: relative;
    padding-left: 1.05rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--asg-text);
}
.asg-vge__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--asg-line);
}

/* Good / Better / Best */
.asg-vge__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: clamp(1.2rem, 2.6vw, 1.8rem);
}
.asg-vge__options article {
    padding: 1rem 1.1rem;
    background: var(--asg-surface-2);
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius-sm);
}
.asg-vge__options span {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--asg-teal);
}
.asg-vge__options strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9375rem;
    line-height: 1.35;
    color: var(--asg-ink);
}
.asg-vge__options p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--asg-muted);
}

.asg-vge__note {
    margin: 1.2rem 0 0;
    padding: 0.9rem 1.1rem;
    background: var(--asg-surface-2);
    border-radius: var(--asg-radius-sm);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--asg-muted);
}

.asg-vge__related {
    margin-top: 1.3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--asg-hairline);
}
.asg-vge__related p {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--asg-faint);
}
.asg-vge .asg-vge__related a {
    display: inline-block;
    margin: 0 0.9rem 0.35rem 0;
    padding: 0.35rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--asg-teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(47, 116, 112, 0.28);
}
.asg-vge .asg-vge__related a:focus-visible {
    outline: none;
    box-shadow: var(--asg-focus);
    border-radius: 4px;
}
.asg-vge .asg-vge__related a:hover { border-bottom-color: currentColor; }
.asg-vge__related small {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--asg-faint);
}

.asg-vge__disclaimer {
    margin: 1.4rem 0 0;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--asg-faint);
}

.asg-vge__restart {
    margin-top: 1.1rem;
    appearance: none;
    background: none;
    border: 0;
    padding: 0.4rem 0;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--asg-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.asg-vge__restart:hover { color: var(--asg-ink); }

/* ==================================================================
 * noscript + crawlable content
 * ================================================================ */

.asg-vge__noscript {
    padding: clamp(1.25rem, 3vw, 2rem);
    text-align: center;
}
.asg-vge__noscript p { margin: 0 0 0.9rem; }

/* ==================================================================
 * Explainer — "About this gutter estimate"
 *
 * Four facets of one answer, not four steps of a process, so the cards
 * carry no numbering and no hierarchy between them: identical weight,
 * identical treatment, one row.
 *
 * Column counts are always divisors of four — 4 -> 2 -> 1 — and are set
 * explicitly rather than by auto-fit. The previous
 * `repeat(auto-fit, minmax(270px, 1fr))` resolved to three columns inside
 * the 1120px container, which stranded the fourth card alone on a second
 * row at every desktop width.
 * ================================================================ */

.asg-vge-seo {
    max-width: 1120px;
    margin: clamp(2rem, 4vw, 3.25rem) auto 0;
}

.asg-vge-seo__head {
    max-width: 44rem;
    margin: 0 0 clamp(1.25rem, 2.6vw, 1.75rem);
}

/* Scoped with the app class so this beats `.breakdance h3` (0,1,1) on
   specificity rather than on stylesheet order — see the heading defence
   near the top of this file. */
.asg-vge .asg-vge-seo__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.35rem, 2.6vw, 1.85rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--asg-ink);
    text-wrap: balance;
}

.asg-vge-seo__deck {
    margin: 0;
    font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
    line-height: 1.55;
    color: var(--asg-muted);
    text-wrap: pretty;
}

.asg-vge-seo__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.875rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.asg-vge-seo__card {
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.15rem 1.3rem;
    background: var(--asg-surface);
    border: 1px solid var(--asg-line);
    border-radius: var(--asg-radius);
}

/* No hover or focus state: the card is not a link and not a control, and
   a lift would promise an interaction that is not there. */
.asg-vge-seo__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 42px;
    height: 42px;
    margin: 0 0 0.95rem;
    border-radius: 11px;
    background: var(--asg-teal-soft);
    color: var(--asg-teal);
}
.asg-vge-seo__icon svg { display: block; }

.asg-vge .asg-vge-seo__card-title {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    line-height: 1.3;
    letter-spacing: -0.012em;
    font-weight: 700;
    color: var(--asg-ink);
    text-wrap: balance;
}

/* Three of the four titles run to two lines and one does not, so the body
   copy started at a different height in each card. Pinning the minimum to
   two lines puts every body on the same baseline across the row; it is
   dropped at one column, where there is no neighbour to align to. */
.asg-vge .asg-vge-seo__card-title { min-height: 2.6em; }

.asg-vge-seo__card-body {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.62;
    color: var(--asg-muted);
    text-wrap: pretty;
}

/* Four columns only once there is genuinely room for a readable measure.
   Below that the count halves rather than dropping to three, so a card is
   never left on its own. */
@media (max-width: 1099px) {
    .asg-vge-seo__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    .asg-vge-seo__card { padding: 1.3rem; }
}

@media (max-width: 599px) {
    .asg-vge-seo__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }
    .asg-vge-seo__card { padding: 1.15rem 1.15rem 1.25rem; }
    .asg-vge-seo__icon {
        width: 38px;
        height: 38px;
        margin-bottom: 0.8rem;
    }
    .asg-vge .asg-vge-seo__card-title { min-height: 0; }
}

.asg-vge-seo__links {
    margin: clamp(1.3rem, 2.4vw, 1.75rem) 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid var(--asg-hairline);
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--asg-muted);
}
.asg-vge .asg-vge-seo__links a {
    /* Inline within a sentence, so the WCAG target-size exception applies —
       but a little vertical room still makes them easier to hit. */
    display: inline-block;
    padding: 0.28rem 0;
    color: var(--asg-teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(47, 116, 112, 0.28);
}
.asg-vge .asg-vge-seo__links a:hover { border-bottom-color: currentColor; }

/* ==================================================================
 * Responsive — mobile is the primary experience
 * ================================================================ */

@media (max-width: 900px) {
    .asg-vge__launch { grid-template-columns: 1fr; }
    .asg-vge__panel {
        border-left: 0;
        border-top: 1px solid var(--asg-line);
    }
    .asg-vge__shell { min-height: 0; }
}

@media (max-width: 640px) {
    .asg-vge__shell { border-radius: 12px; }
    .asg-vge__fields--lead { grid-template-columns: 1fr; }
    .asg-vge__services { grid-template-columns: 1fr 1fr; }

    /* Stack the navigation with the primary action at the BOTTOM — the
       easiest place to reach one-handed, and the conventional position, so
       nobody has to hunt for Continue. Back sits above it, where a mis-tap
       costs nothing. DOM order is already Back then Continue, so plain
       `column` gives the right visual order and the right tab order. */
    .asg-vge__nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .asg-vge__nav .asg-vge__btn { width: 100%; min-width: 0; }
    .asg-vge__nav-note { text-align: center; }

    .asg-vge__actions { flex-direction: column; }
    .asg-vge__actions .asg-vge__btn { width: 100%; }

    .asg-vge__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }
    .asg-vge__row dd { text-align: left; }

    .asg-vge__metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
    .asg-vge__services { grid-template-columns: 1fr; }
    .asg-vge__metrics { grid-template-columns: 1fr; }
    .asg-vge__chip { width: 100%; justify-content: flex-start; }
}

/* ==================================================================
 * Preferences
 * ================================================================ */

@media (prefers-reduced-motion: reduce) {
    .asg-vge *,
    .asg-vge *::before,
    .asg-vge *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Windows high-contrast: chips and analysis states are conveyed by colour
   alone in the design above, so restore visible borders there. */
@media (forced-colors: active) {
    .asg-vge__chip:has(input:checked) { border: 3px solid; }
    .asg-vge__service[aria-pressed="true"] { border: 3px solid; }
    .asg-vge__btn { border: 1px solid; }
}
