/* Wall Selector V2 layout corrections — 0.3.6 */

/* Keep every choice group centered and limited to three consistent columns. */
#wizardApp .choice-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(170px, 215px)) !important;
    justify-content: center !important;
    align-items: start !important;
    align-content: start !important;
    gap: 12px !important;
    width: min(100%, 690px) !important;
    margin: 28px auto 0 !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
}

#wizardApp .choice-grid .v2-choice {
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 215px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#wizardApp .choice-grid .v2-choice > label {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 148px !important;
    min-height: 148px !important;
    margin: 0 !important;
    padding: 10px 10px 7px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

#wizardApp .choice-grid .checkimg {
    display: block !important;
    width: 100% !important;
    height: 105px !important;
    max-width: 100% !important;
    max-height: 105px !important;
    margin: 0 auto 4px !important;
    object-fit: contain !important;
}

#wizardApp .choice-grid .choice-name {
    display: block !important;
    width: 100% !important;
    min-height: 18px !important;
    margin: 0 !important;
    overflow: hidden !important;
    font-size: 13px !important;
    line-height: 16px !important;
    text-align: center !important;
    white-space: normal !important;
}

/* The aesthetic grid uses the same card dimensions instead of stretching. */
#wizardApp .choice-grid-aesthetic {
    grid-template-columns: repeat(3, minmax(170px, 215px)) !important;
}

/* Prevent a single or two-item result from being left aligned. */
#wizardApp .choice-grid > .v2-message {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    text-align: center !important;
}

/* Clean left-side informational content. This avoids legacy floated ID rules. */
#leftcol .v2-learn-panel {
    width: 100% !important;
    max-width: 660px !important;
    margin: 0 auto !important;
    padding: 48px 42px 34px !important;
    box-sizing: border-box !important;
    color: #fff !important;
    font-family: "Open Sans", Arial, sans-serif !important;
    text-align: left !important;
}

#leftcol .v2-learn-section {
    display: block !important;
    clear: both !important;
    width: 100% !important;
    margin: 0 0 30px !important;
    padding: 0 !important;
}

#leftcol .v2-learn-section h2 {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: 25px !important;
    font-weight: 700 !important;
    line-height: 1.18 !important;
    text-align: left !important;
}

#leftcol .v2-learn-section p {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

#leftcol .v2-learn-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
    min-width: 315px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 7px 24px !important;
    border: 1px solid #111 !important;
    border-radius: 24px !important;
    background: #fff !important;
    color: #111 !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
}

@media (max-width: 1180px) {
    #wizardApp .choice-grid,
    #wizardApp .choice-grid-aesthetic {
        grid-template-columns: repeat(2, minmax(160px, 205px)) !important;
        width: min(100%, 440px) !important;
    }
}

@media (max-width: 760px) {
    #wizardApp .choice-grid,
    #wizardApp .choice-grid-aesthetic {
        grid-template-columns: minmax(160px, 215px) !important;
        width: 100% !important;
    }

    #leftcol .v2-learn-panel {
        padding: 30px 24px !important;
    }

    #leftcol .v2-learn-button {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* v0.3.7 header tools */
#topcolright {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;
}

#topcolright .tooltip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#topcolright .v2-header-tool,
#topcolright .icon-button.v2-header-tool {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 3px !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

#topcolright .v2-header-tool img,
#topcolright .icon-button.v2-header-tool img {
    display: block !important;
    width: 34px !important;
    height: 34px !important;
    max-width: 34px !important;
    object-fit: contain !important;
}

@media (max-width: 760px) {
    #topcolright { gap: 6px !important; }
    #topcolright .v2-header-tool,
    #topcolright .icon-button.v2-header-tool { width: 34px !important; height: 34px !important; }
    #topcolright .v2-header-tool img,
    #topcolright .icon-button.v2-header-tool img { width: 28px !important; height: 28px !important; }
}

/* v0.3.8: flex rows center one, two, or three cards instead of leaving partial rows left aligned. */
#wizardApp .choice-grid,
#wizardApp .choice-grid-aesthetic {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: flex-start !important;
    align-content: flex-start !important;
    width: min(100%, 690px) !important;
    gap: 12px !important;
}

#wizardApp .choice-grid .v2-choice {
    flex: 0 0 215px !important;
    width: 215px !important;
    max-width: 215px !important;
}

@media (max-width: 1180px) {
    #wizardApp .choice-grid,
    #wizardApp .choice-grid-aesthetic { width: min(100%, 440px) !important; }
    #wizardApp .choice-grid .v2-choice { flex-basis: 205px !important; width: 205px !important; max-width: 205px !important; }
}

@media (max-width: 760px) {
    #wizardApp .choice-grid,
    #wizardApp .choice-grid-aesthetic { width: 100% !important; }
    #wizardApp .choice-grid .v2-choice { flex-basis: min(215px, 100%) !important; width: min(215px, 100%) !important; }
}

/* Saved wall dialog */
.v2-modal[hidden] { display: none !important; }
.v2-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 20px 30px;
    overflow-y: auto;
    background: rgba(0,0,0,.76);
    box-sizing: border-box;
}
.v2-modal-open { overflow: hidden; }
.v2-modal-dialog {
    position: relative;
    width: min(620px, 100%);
    min-height: 290px;
    margin-top: 0;
    padding: 42px 56px 34px;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
    text-align: center;
    font-family: "Open Sans", Arial, sans-serif;
}
.v2-modal-close {
    position: absolute;
    top: 22px;
    right: 20px;
    border: 0;
    background: transparent;
    color: #aaa;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.v2-modal-logo { width: min(400px, 85%); height: auto; }
.v2-modal-dialog h2 { margin: 2px 0 18px; font-size: 25px; font-weight: 400; }
.v2-save-form { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.v2-save-form input {
    width: min(300px, 100%);
    height: 36px;
    padding: 2px 8px;
    border: 1px solid #222;
    font-size: 22px;
    box-sizing: border-box;
}
.v2-save-form button {
    min-width: 118px;
    padding: 5px 18px;
    border: 1px solid #222;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
}
.v2-saved-wall-head {
    display: grid;
    grid-template-columns: 1fr 120px;
    margin-top: 28px;
    padding: 0 38px 8px;
    font-size: 13px;
    text-align: left;
}
.v2-saved-wall-head span:last-child { text-align: center; }
.v2-saved-walls { display: grid; gap: 7px; }
.v2-saved-walls .v2-message { padding: 12px; font-size: 14px; }
.v2-saved-wall {
    display: grid;
    grid-template-columns: 1fr 34px;
    align-items: center;
    border-top: 1px solid #ddd;
}
.v2-saved-wall-open {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 12px;
    width: 100%;
    padding: 9px 4px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.v2-saved-wall-open span { text-align: center; font-size: 13px; }
.v2-saved-wall-delete { border: 0; background: transparent; font-size: 24px; cursor: pointer; }
.screen-reader-text { 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; }
@media (max-width: 600px) {
    .v2-modal-dialog { padding: 42px 22px 28px; }
    .v2-saved-wall-head { padding-left: 4px; padding-right: 34px; }
}

/* v0.4.0 — keep three centered cards on desktop/tablet layouts. */
@media (min-width: 761px) {
    #wizardApp .choice-grid,
    #wizardApp .choice-grid-aesthetic {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        width: min(100%, 690px) !important;
        max-width: 690px !important;
        gap: 12px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #wizardApp .choice-grid .v2-choice,
    #wizardApp .choice-grid-aesthetic .v2-choice {
        flex: 0 0 calc((100% - 24px) / 3) !important;
        width: calc((100% - 24px) / 3) !important;
        max-width: 215px !important;
        min-width: 0 !important;
    }
}

.v2-copy-icon {
    display: block;
    font-size: 27px;
    line-height: 1;
}

.v2-final-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.v2-secondary-button {
    appearance: none;
    cursor: pointer;
}

.v2-final-saved {
    width: min(620px, 100%);
    margin: 34px auto 0;
    padding-top: 24px;
    border-top: 1px solid #ddd;
    text-align: left;
}

.v2-final-saved h3,
.v2-final-saved p {
    text-align: center;
}

.v2-saved-wall-final {
    grid-template-columns: 1fr;
}

@media (max-width: 760px) {
    .v2-final-actions { flex-direction: column; align-items: center; }
}


/* v0.4.1 — polished confirmation screen and iframe results modal. */
#wizardApp [data-step="10"] {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

#wizardApp [data-step="10"] > .text {
    margin-bottom: 22px !important;
}

.v2-confirmation {
    width: min(100%, 820px);
    margin: 0 auto;
    padding: 30px 34px 34px;
    border: 1px solid #dedede;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .09);
    box-sizing: border-box;
    text-align: center;
}

.v2-confirmation > p:first-child {
    margin: 0 0 24px;
    color: #555;
    font-size: 16px;
    line-height: 1.5;
}

#confirmationSummary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    margin: 0 auto 22px;
    overflow: hidden;
    border: 1px solid #e2e2e2;
    border-radius: 16px;
    background: #fafafa;
    text-align: left;
}

#confirmationSummary dt,
#confirmationSummary dd {
    margin: 0;
    padding: 11px 15px;
    border-bottom: 1px solid #e7e7e7;
    box-sizing: border-box;
}

#confirmationSummary dt {
    color: #5f7283;
    font-weight: 700;
}

#confirmationSummary dd {
    color: #111;
    font-weight: 600;
}

#confirmationSummary dt:nth-last-of-type(1),
#confirmationSummary dd:nth-last-of-type(1) {
    border-bottom: 0;
}

#compatibleSystemCount {
    margin: 18px 0 0;
    color: #5f7283;
    font-size: 16px;
    font-weight: 700;
}

.v2-results-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 230px;
    min-height: 48px;
    padding: 10px 24px !important;
    border: 2px solid #f7a600 !important;
    border-radius: 28px !important;
    background: #f7a600 !important;
    color: #111 !important;
    box-sizing: border-box;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
}

.v2-results-button:hover,
.v2-results-button:focus {
    box-shadow: 0 5px 15px rgba(0,0,0,.14);
    transform: translateY(-1px);
}

.v2-results-button.v2-secondary-button {
    background: #fff !important;
    color: #222 !important;
}

.v2-results-button.is-disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.v2-results-modal[hidden] { display: none !important; }
.v2-results-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(0, 0, 0, .78);
    box-sizing: border-box;
}

.v2-results-modal-open { overflow: hidden; }

.v2-results-modal-dialog {
    display: flex;
    flex-direction: column;
    width: min(98vw, 1540px);
    height: min(94vh, 980px);
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.v2-results-modal-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 8px 60px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    box-sizing: border-box;
}

.v2-results-modal-header h2 {
    margin: 0;
    color: #111;
    font-size: 19px;
    line-height: 1.2;
}

.v2-results-modal-close {
    position: absolute;
    top: 50%;
    right: 15px;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #999;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.v2-results-modal-close:hover,
.v2-results-modal-close:focus { color: #111; }

.v2-results-frame {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

@media (max-width: 700px) {
    .v2-confirmation { padding: 24px 18px 28px; }
    #confirmationSummary { grid-template-columns: 1fr; }
    #confirmationSummary dt { padding-bottom: 2px; border-bottom: 0; }
    #confirmationSummary dd { padding-top: 2px; }
    .v2-results-modal { padding: 0; }
    .v2-results-modal-dialog { width: 100vw; height: 100vh; border-radius: 0; }
    .v2-results-modal-header { padding-left: 45px; padding-right: 45px; }
    .v2-results-modal-header h2 { font-size: 16px; }
}


/* v0.4.6: keep header icon tooltips above the wizard content. */
#toparea,
#topnav {
    position: relative !important;
    z-index: 1000 !important;
    overflow: visible !important;
}

#topcolright {
    position: relative !important;
    z-index: 1001 !important;
    overflow: visible !important;
}

#topcolright .tooltip {
    position: relative !important;
    z-index: 1002 !important;
    overflow: visible !important;
}

#topcolright .tooltip .tooltiptext-home,
#topcolright .tooltip .tooltiptext-email,
#topcolright .tooltip .tooltiptext-save,
#topcolright .tooltip .tooltiptext-reset {
    z-index: 10000 !important;
    top: calc(100% + 8px) !important;
    left: 50% !important;
    margin-left: 0 !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    min-width: 50px !important;
    max-width: 180px !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
}

#bottomarea,
#bottomareamain {
    position: relative !important;
    z-index: 1 !important;
}


/* ==========================================================================
   v0.5.0 entry and project-type screens
   ========================================================================== */

.wsv2-entry-screen {
    width: 100%;
    box-sizing: border-box;
}

.wsv2-entry-logo {
    height: 90px;
    display: flex;
    align-items: center;
    padding: 0 4%;
    background: #fff;
    box-sizing: border-box;
}

.wsv2-entry-logo img {
    width: min(430px, 55vw);
    height: auto;
}

.wsv2-home-screen {
    min-height: 100vh;
    background: #fff;
}

.wsv2-home-content {
    min-height: calc(100vh - 90px);
    padding: 6% 4% 3%;
    background-image: url("../img/home-image.jpg");
    background-size: cover;
    background-position: center center;
    box-sizing: border-box;
}

.wsv2-home-content h1 {
    margin: 0 0 32px;
    max-width: 650px;
    font-size: clamp(32px, 3vw, 48px);
    line-height: 1.1;
    color: #111;
}

.wsv2-home-content > p:not(.wsv2-desktop-note) {
    max-width: 660px;
    margin: 0;
    font-size: clamp(17px, 1.25vw, 22px);
    line-height: 1.55;
    font-weight: 600;
    color: #111;
}

.wsv2-home-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 190px));
    gap: 4%;
    margin-top: 7%;
    max-width: 980px;
}

.wsv2-entry-button,
.wsv2-project-button,
.wsv2-small-button,
.wsv2-primary-start {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 20px;
    border: 1.5px solid #111;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.wsv2-home-actions .wsv2-entry-button {
    border-color: #ffcc00;
}

.wsv2-entry-button:hover,
.wsv2-entry-button:focus,
.wsv2-project-button:hover,
.wsv2-project-button:focus,
.wsv2-small-button:hover,
.wsv2-small-button:focus {
    background: #ffcc00;
    color: #111;
}

.wsv2-desktop-note {
    margin-top: 6%;
    color: #fff;
    font-size: 15px;
}

.wsv2-project-screen {
    background: #fff;
}

.wsv2-project-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 86px);
}

.wsv2-project-panel {
    padding: 22px 5% 40px;
    box-sizing: border-box;
}

.wsv2-renovation-panel {
    position: relative;
    color: #fff;
    background: #677d92;
    overflow: hidden;
}

.wsv2-renovation-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/learn-more-bg-pattern.png");
    background-size: cover;
    background-position: center;
    opacity: .12;
    pointer-events: none;
}

.wsv2-renovation-panel > * {
    position: relative;
    z-index: 1;
}

.wsv2-new-panel {
    color: #111;
    background: #f9aa00;
}

.wsv2-project-kicker {
    font-size: 21px;
    opacity: .85;
}

.wsv2-project-panel h2 {
    margin: 2px 0 20px;
    font-size: clamp(32px, 3vw, 48px);
    line-height: 1.05;
}

.wsv2-project-intro {
    display: grid;
    grid-template-columns: minmax(165px, 28%) 1fr;
    gap: 22px;
    align-items: start;
}

.wsv2-project-intro img {
    width: 100%;
    max-height: 170px;
    object-fit: cover;
    box-shadow: 2px 3px 5px rgba(0,0,0,.28);
}

.wsv2-project-intro p,
.wsv2-project-panel > p,
.wsv2-project-links p {
    font-size: 17px;
    line-height: 1.42;
}

.wsv2-project-button {
    width: fit-content;
    margin: 12px 0;
}

.wsv2-restore-levels {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.wsv2-restore-levels li {
    margin: 0 0 12px;
}

.wsv2-restore-levels strong {
    display: block;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.62);
    color: #111;
}

.wsv2-restore-levels span {
    display: block;
    padding: 5px 18px 0;
    color: #111;
    font-size: 13px;
    line-height: 1.4;
}

.wsv2-renovation-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wsv2-small-button {
    min-height: 54px;
    padding: 7px 16px;
    font-size: 12px;
    line-height: 1.25;
}

.wsv2-primary-start {
    width: 100%;
    min-height: 100px;
    margin: 10px 0 38px;
    border-radius: 28px;
    font-size: clamp(20px, 2vw, 30px);
}

.wsv2-project-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

body.wsv2-stage-home #topnav,
body.wsv2-stage-home #bottomarea,
body.wsv2-stage-home #footerwst,
body.wsv2-stage-project #bottomarea {
    display: none !important;
}

body.wsv2-stage-project #wsv2HomeScreen,
body.wsv2-stage-wizard #wsv2HomeScreen,
body.wsv2-stage-home #wsv2ProjectScreen,
body.wsv2-stage-wizard #wsv2ProjectScreen {
    display: none !important;
}

body.wsv2-stage-project #topnav,
body.wsv2-stage-project #footerwst,
body.wsv2-stage-wizard #topnav,
body.wsv2-stage-wizard #bottomarea,
body.wsv2-stage-wizard #footerwst {
    display: flex;
}

body.wsv2-stage-project #topnav {
    min-height: 86px;
}

body.wsv2-stage-project #footerwst {
    display: block;
}

@media (max-width: 900px) {
    .wsv2-home-actions {
        grid-template-columns: repeat(2, minmax(150px, 210px));
        gap: 16px;
    }

    .wsv2-project-columns {
        grid-template-columns: 1fr;
    }

    .wsv2-project-intro {
        grid-template-columns: 160px 1fr;
    }
}

@media (max-width: 560px) {
    .wsv2-entry-logo {
        height: 72px;
    }

    .wsv2-home-content {
        min-height: calc(100vh - 72px);
        padding-top: 50px;
        background-position: 60% center;
    }

    .wsv2-home-actions {
        grid-template-columns: 1fr;
        max-width: 260px;
    }

    .wsv2-project-intro,
    .wsv2-renovation-actions {
        grid-template-columns: 1fr;
    }

    .wsv2-project-intro img {
        max-width: 280px;
    }
}


/* ==========================================================================
   v1.0.0 production stage shell and project-page polish
   ========================================================================== */

html,
body {
    min-height: 100%;
}

body.nostyle {
    margin: 0;
}

#page-container,
#content-wrap {
    min-height: 100vh;
}

#content-wrap {
    display: flex;
    flex-direction: column;
}

#topnav {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    min-height: 86px;
    position: sticky !important;
    top: 0;
    z-index: 5000 !important;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,.08);
}

#wsv2HomeScreen {
    order: 2;
}

#wsv2ProjectScreen {
    order: 2;
    flex: 1 0 auto;
}

#bottomarea {
    order: 2;
    flex: 1 0 auto;
}

#footerwst {
    order: 3;
    flex: 0 0 auto;
}

/* The landing page carries its own logo, so the application header is hidden. */
body.wsv2-stage-home #topnav,
body.wsv2-stage-home #bottomarea,
body.wsv2-stage-home #footerwst,
body.wsv2-stage-home #wsv2ProjectScreen {
    display: none !important;
}

/* Project page: shared header first, content second, footer last. */
body.wsv2-stage-project #topnav {
    display: flex !important;
}

body.wsv2-stage-project #wsv2ProjectScreen {
    display: block !important;
}

body.wsv2-stage-project #bottomarea {
    display: none !important;
}

body.wsv2-stage-project #footerwst {
    display: block !important;
}

/* Wizard page uses the same shell and header. */
body.wsv2-stage-wizard #topnav {
    display: flex !important;
}

body.wsv2-stage-wizard #bottomarea {
    display: flex !important;
}

body.wsv2-stage-wizard #footerwst {
    display: block !important;
}

body.wsv2-stage-wizard #wsv2ProjectScreen,
body.wsv2-stage-wizard #wsv2HomeScreen {
    display: none !important;
}

/* Project selection layout closely matching the production reference. */
.wsv2-project-screen {
    min-height: calc(100vh - 86px);
    background: #fff;
}

.wsv2-project-columns {
    min-height: calc(100vh - 86px);
    align-items: stretch;
}

.wsv2-project-panel {
    min-height: calc(100vh - 86px);
    padding: 22px 4.6% 34px;
}

.wsv2-renovation-panel {
    background-color: #687e93;
    background-image:
        linear-gradient(rgba(104,126,147,.92), rgba(104,126,147,.92)),
        url("../img/learn-more-bg-pattern.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.wsv2-renovation-panel::after {
    display: none;
}

.wsv2-new-panel {
    background: #f9ad00;
}

.wsv2-project-kicker {
    margin-bottom: 2px;
    font-size: clamp(18px, 1.5vw, 25px);
    line-height: 1.2;
}

.wsv2-project-panel h2 {
    margin: 0 0 24px;
    font-size: clamp(34px, 3vw, 48px);
    font-weight: 700;
}

.wsv2-project-intro {
    grid-template-columns: minmax(180px, 28%) 1fr;
    gap: 20px;
    align-items: start;
}

.wsv2-project-intro p,
.wsv2-project-panel > p,
.wsv2-project-links p {
    margin-top: 2px;
    font-size: clamp(15px, 1.15vw, 19px);
    line-height: 1.45;
}

.wsv2-project-intro img {
    max-height: 155px;
}

.wsv2-project-button {
    min-height: 38px;
    padding: 7px 22px;
    margin: 12px 0 16px;
}

.wsv2-restore-levels {
    margin-top: 0;
}

.wsv2-restore-levels li {
    margin-bottom: 10px;
}

.wsv2-restore-levels strong {
    padding: 7px 18px;
    background: rgba(230,237,243,.82);
}

.wsv2-restore-levels span {
    padding: 5px 18px 0;
    font-size: 12px;
}

.wsv2-renovation-actions {
    margin-top: 8px;
}

.wsv2-small-button {
    min-height: 50px;
    background: #fff;
    color: #111;
}

.wsv2-primary-start {
    min-height: 98px;
    margin: 16px 0 38px;
    border: 1.5px solid #111;
    background: #fff;
    font-weight: 700;
}

.wsv2-primary-start:hover,
.wsv2-primary-start:focus {
    background: #ffcc00;
}

.wsv2-project-links {
    gap: 2px;
}

/* Keep the contact/footer section below the project page rather than floating
   over or before the content. */
body.wsv2-stage-project #footerwst {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    margin-top: 0;
    background: #fff;
    z-index: 10;
}

body.wsv2-stage-project #contactrep {
    margin-top: 8px;
}

/* Header icon alignment and production-sized logo. */
#topcolleft {
    display: flex;
    align-items: center;
}

#topcolleft img {
    max-width: min(430px, 44vw);
    height: auto;
}

#topcolright {
    align-items: center;
}

/* Responsive project page. */
@media (max-width: 1000px) {
    .wsv2-project-panel {
        padding-left: 4%;
        padding-right: 4%;
    }

    .wsv2-project-intro {
        grid-template-columns: 155px 1fr;
    }
}

@media (max-width: 760px) {
    #topnav {
        position: relative !important;
    }

    .wsv2-project-columns {
        grid-template-columns: 1fr;
    }

    .wsv2-project-panel {
        min-height: auto;
    }

    .wsv2-project-intro {
        grid-template-columns: 1fr;
    }

    .wsv2-project-intro img {
        width: min(100%, 320px);
    }

    .wsv2-renovation-actions {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   v1.1.0 production wizard layout
   Exact 50/50 split between information and selector panels
   ========================================================================== */

body.wsv2-stage-wizard #bottomarea {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100vh - 86px);
    align-items: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
}

body.wsv2-stage-wizard #bottomarealeft,
body.wsv2-stage-wizard #bottomareamain {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.wsv2-stage-wizard #bottomarealeft {
    grid-column: 1;
    min-height: calc(100vh - 86px);
    overflow: auto;
}

body.wsv2-stage-wizard #bottomareamain {
    grid-column: 2;
    min-height: calc(100vh - 86px);
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 34px 28px 48px !important;
    background: #f7f7f7;
}

body.wsv2-stage-wizard #bottomareamain > * {
    width: 100%;
    max-width: 880px;
    box-sizing: border-box;
}

body.wsv2-stage-wizard #questionarea,
body.wsv2-stage-wizard #questions,
body.wsv2-stage-wizard #optionarea,
body.wsv2-stage-wizard #selectionarea,
body.wsv2-stage-wizard .question-container,
body.wsv2-stage-wizard .options-container,
body.wsv2-stage-wizard .v2-options-grid {
    width: 100% !important;
    max-width: 880px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

body.wsv2-stage-wizard .v2-options-grid,
body.wsv2-stage-wizard .options-container {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    justify-content: center !important;
    align-items: stretch;
    gap: 14px !important;
}

body.wsv2-stage-wizard .v2-options-grid > :last-child:nth-child(3n + 1),
body.wsv2-stage-wizard .options-container > :last-child:nth-child(3n + 1) {
    grid-column: 2;
}

body.wsv2-stage-wizard .v2-options-grid > :nth-last-child(2):nth-child(3n + 1),
body.wsv2-stage-wizard .options-container > :nth-last-child(2):nth-child(3n + 1) {
    grid-column: 1;
    transform: translateX(50%);
}

body.wsv2-stage-wizard .v2-options-grid > :last-child:nth-child(3n + 2),
body.wsv2-stage-wizard .options-container > :last-child:nth-child(3n + 2) {
    transform: translateX(50%);
}

body.wsv2-stage-wizard .v2-option-card,
body.wsv2-stage-wizard .option-card,
body.wsv2-stage-wizard .answer {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.wsv2-stage-wizard #bottomarealeft > *,
body.wsv2-stage-wizard #bottomareamain > * {
    float: none !important;
}

body.wsv2-stage-wizard #topnav {
    width: 100%;
}

@media (max-width: 1100px) {
    body.wsv2-stage-wizard #bottomareamain {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    body.wsv2-stage-wizard .v2-options-grid,
    body.wsv2-stage-wizard .options-container {
        gap: 10px !important;
    }
}

@media (max-width: 820px) {
    body.wsv2-stage-wizard #bottomarea {
        grid-template-columns: 1fr !important;
        overflow: visible;
    }

    body.wsv2-stage-wizard #bottomarealeft,
    body.wsv2-stage-wizard #bottomareamain {
        grid-column: 1;
        min-height: auto;
    }

    body.wsv2-stage-wizard #bottomarealeft {
        display: none !important;
    }

    body.wsv2-stage-wizard #bottomareamain {
        padding: 28px 18px 42px !important;
    }
}

@media (max-width: 620px) {
    body.wsv2-stage-wizard .v2-options-grid,
    body.wsv2-stage-wizard .options-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.wsv2-stage-wizard .v2-options-grid > *,
    body.wsv2-stage-wizard .options-container > * {
        grid-column: auto !important;
        transform: none !important;
    }

    body.wsv2-stage-wizard .v2-options-grid > :last-child:nth-child(2n + 1),
    body.wsv2-stage-wizard .options-container > :last-child:nth-child(2n + 1) {
        grid-column: 1 / -1 !important;
        width: calc(50% - 5px) !important;
        justify-self: center;
    }
}


/* v1.1.1: canonical results-count loading state. */
#compatibleSystemCount.is-loading {
    opacity: .75;
}


/* ==========================================================================
   v1.1.3 insulation comparison modal
   ========================================================================== */

.v2-insulation-comparison-button {
    margin: 28px 0 64px !important;
    border-color: #111 !important;
    background: #fff !important;
    color: #111 !important;
}

.v2-insulation-comparison-button:hover,
.v2-insulation-comparison-button:focus {
    border-color: #ffcc00 !important;
    background: #ffcc00 !important;
}

.v2-comparison-modal[hidden] {
    display: none !important;
}

.v2-comparison-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(0, 0, 0, .8);
    box-sizing: border-box;
}

.v2-comparison-modal-open {
    overflow: hidden;
}

.v2-comparison-modal-dialog {
    display: flex;
    flex-direction: column;
    width: min(94vw, 1500px);
    max-height: 92vh;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.v2-comparison-modal-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 10px 60px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    box-sizing: border-box;
}

.v2-comparison-modal-header h2 {
    margin: 0;
    color: #222;
    font-size: 18px;
    line-height: 1.2;
    text-align: center;
}

.v2-comparison-modal-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background: #fff;
    box-sizing: border-box;
}

.v2-comparison-frame {
    display: block;
    width: 100%;
    height: min(82vh, 900px);
    min-height: 560px;
    border: 0;
    background: #fff;
}

@media (max-width: 700px) {
    .v2-comparison-modal {
        padding: 0;
    }

    .v2-comparison-modal-dialog {
        width: 100vw;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .v2-comparison-modal-header {
        padding-left: 46px;
        padding-right: 46px;
    }

    .v2-comparison-modal-header h2 {
        font-size: 15px;
    }

    .v2-comparison-modal-body {
        padding: 0;
    }

    .v2-comparison-frame {
        height: 100%;
        min-height: 0;
    }
}


/* v1.1.4 left-content links, missing imagery, and confirmation editing. */
.v2-confirm-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}
.v2-confirm-edit-grid button,
.v2-confirm-edit-button {
    appearance: none;
    border: 1.5px solid #111;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.v2-confirm-edit-grid button {
    min-height: 44px;
    padding: 8px 14px;
}
.v2-confirm-edit-grid button:hover,
.v2-confirm-edit-grid button:focus,
.v2-confirm-edit-button:hover,
.v2-confirm-edit-button:focus {
    border-color: #ffcc00;
    background: #ffcc00;
}
#confirmationSummary dd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.v2-confirm-edit-button {
    flex: 0 0 auto;
    min-width: 64px;
    padding: 5px 14px;
    font-size: 13px;
}
@media (max-width: 560px) {
    .v2-confirm-edit-grid { grid-template-columns: 1fr; }
    #confirmationSummary dd { gap: 8px; }
    .v2-confirm-edit-button { min-width: 54px; padding: 4px 10px; }
}


/* ==========================================================================
   v1.1.5 left-panel layout corrections
   ========================================================================== */

/* Insulation screen: paragraph, button, then two aligned images. */
.myVids[data-learn="5"] #learn {
    display: flow-root;
}

.myVids[data-learn="5"] #learndeckonly {
    width: 100% !important;
    margin: 0 0 28px !important;
    padding: 0 !important;
    float: none !important;
    box-sizing: border-box;
}

.myVids[data-learn="5"] .v2-insulation-comparison-button {
    display: flex !important;
    clear: both !important;
    float: none !important;
    width: auto !important;
    min-width: 235px;
    max-width: 100%;
    min-height: 42px;
    margin: 0 0 90px !important;
    padding: 8px 28px !important;
}

.myVids[data-learn="5"] #learnimagehalf {
    float: left !important;
    width: calc(50% - 10px) !important;
    padding: 0 !important;
    margin: 0 20px 0 0 !important;
    box-sizing: border-box;
}

.myVids[data-learn="5"] #learnimagehalf:nth-of-type(2) {
    margin-right: 0 !important;
}

.myVids[data-learn="5"] #learnimagehalf img {
    display: block;
    width: 100% !important;
    height: auto;
}

/* Confirmation edit panel: prevent legacy floated text from pushing the
   category buttons into a narrow strip on the right. */
.v2-confirm-edit-panel {
    display: flow-root;
    width: 100%;
    box-sizing: border-box;
}

.v2-confirm-edit-panel #learnheaderwhite24 {
    width: 100% !important;
    margin: 0 0 4px !important;
    float: none !important;
    clear: both !important;
}

.v2-confirm-edit-panel #learnmaintextwhite {
    display: block !important;
    width: 100% !important;
    max-width: 690px;
    margin: 0 0 28px !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box;
}

.v2-confirm-edit-panel .v2-confirm-edit-grid {
    display: grid !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    max-width: 680px;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 16px !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.v2-confirm-edit-panel .v2-confirm-edit-grid button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px;
    padding: 8px 16px !important;
    border-radius: 999px;
    white-space: normal;
    line-height: 1.15;
    text-align: center;
    box-sizing: border-box;
}

@media (max-width: 620px) {
    .myVids[data-learn="5"] .v2-insulation-comparison-button {
        margin-bottom: 0 !important;
    }

    .myVids[data-learn="5"] #learnimagehalf {
        float: none !important;
        width: 100% !important;
        margin: 0 0 20px !important;
    }

    .v2-confirm-edit-panel .v2-confirm-edit-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ==========================================================================
   v1.1.6 definitive insulation panel structure
   ========================================================================== */

.myVids[data-learn="5"] #learn {
    display: block !important;
}

.myVids[data-learn="5"] #learndeckonly {
    display: block !important;
    width: 100% !important;
    margin: 0 0 30px !important;
    float: none !important;
    clear: both !important;
}

.myVids[data-learn="5"] .v2-insulation-comparison-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 235px;
    min-height: 42px;
    margin: 0 !important;
    float: none !important;
    clear: both !important;
    position: static !important;
}

.myVids[data-learn="5"] .v2-insulation-images {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    margin: 40px 0 0 !important;
    clear: both !important;
    float: none !important;
    box-sizing: border-box;
}

.myVids[data-learn="5"] .v2-insulation-image {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    box-sizing: border-box;
}

.myVids[data-learn="5"] .v2-insulation-image img {
    display: block;
    width: 100% !important;
    height: auto;
    margin: 0 !important;
}

/* Disable legacy duplicate-ID image rules for this newly structured panel. */
.myVids[data-learn="5"] #learnimagehalf {
    display: none !important;
}

@media (max-width: 620px) {
    .myVids[data-learn="5"] .v2-insulation-comparison-button {
        margin-bottom: 34px !important;
    }

    .myVids[data-learn="5"] .v2-insulation-images {
        grid-template-columns: 1fr;
    }
}
