html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    color: #222;

    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header{
    width: 75rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    margin: 0 auto 1rem;
    .logo{
        display: block;
        margin: 1rem 1rem 1rem 0;
        stroke-width: 1.4rem;
        stroke-linecap: round;
        width: 3rem;
        stroke: #cecece;
        .one {
            stroke: #006648;
        }
    }
    .slogan {
        font-size: 2.2rem;
        color: #006648;
        font-weight: bold;
        line-height: 3rem;
    }
}

main{
    flex: 1;
}

.container{
    width: 75rem;
    margin: 0 auto;
}

.home-container{
    p, ul{
        font-size: 1.2rem;
        line-height: 1.8rem;
    }
}
a {
    color: #006648;
}

.property-container{
    h2{
        font-size: 2.1rem;
        margin: 2rem 0 1.5rem;
    }
    h3{
        font-size: 1.9rem;
        margin: 2rem 0 1rem;
    }
    .hero{
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-template-areas:
            "title title"
            "image price"
            "image location"
            "image features"
            "image ."
            "summary summary";
        column-gap: 2rem;
        align-items: start;
        align-content: start;
        .image{
            grid-area: image;
            img{
                width: 100%;
                height: 28rem;
                display: block;
                object-fit: cover;
            }
        }
        h1{
            grid-area: title;
            margin: 0 0 2rem;
            font-size: 2.2rem;
        }
        h1::after{
            content: "";
            display: block;
            width: 24rem;
            height: 0.3rem;
            background-color: #006648;
            margin-top: 0.8rem;
        }
        .price{
            font-size: 1.9rem;
            grid-area: price;
            text-align: center;
            padding-top: 1rem;
            font-weight: bold;
            color: #006648;
        }
        .location{
            grid-area: location;
            font-size: 1.4rem;
            text-align: center;
            line-height: 3rem;
            padding-bottom: 2rem;
            svg {
                width: 1.2rem;
                height: 1.2rem;
                vertical-align: baseline;
            }
        }
        .features{
            grid-area: features;
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;

            .card {
                color: #006648;
                background-color: #eee;
                padding: 1rem 1rem 2rem;
                border-radius: 0.5rem;
                width: 8rem;
                text-align: center;
                font-size: 1.4rem;
                font-weight: bold;
                position: relative;
                .label {
                    display: block;
                    position: absolute;
                    bottom: 0;
                    left: 1rem;
                    width: 8rem;
                    font-size: 1rem;
                    text-align: center;
                    line-height: 2rem;
                    font-weight: normal;
                    color: #222;
                }

            }
        }
        .summary{
            position: relative;
            margin: 4rem 0;
            padding: 0 1rem 0 5rem;
            line-height: 2rem;
            font-size: 1.6rem;
            font-style: italic;
            grid-area: summary;
        }
        .summary::before {
            content: "“";
            position: absolute;
            top: -0.5rem;
            left: 1.5rem;
            font-size: 5rem;
            font-family: Georgia, serif;
            color: #006648;
            opacity: 0.15;
            line-height: 1;
        }
    }
    .property-details-layout {
        .highlights {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 1.4rem;

            .card {
                font-size: 1.4rem;
                background-color: #006648;
                color: white;
                padding: 1rem 1.5rem;
                border-radius: 0.5rem;

                svg {
                    width: 1.2rem;
                    height: 1.2rem;
                    vertical-align: baseline;
                    margin-right: 0.5rem;
                }
            }
        }

        .gallery {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 1rem;

            img {
                display: block;
                height: 9rem;
            }
        }

        .description {
            font-size: 1.2rem;
            line-height: 1.8rem;
            h2 {
                font-size: 1.4rem;
            }
        }

        .details {
            container-type: inline-size;
            column-width: 25rem;
            column-gap: 1rem;

            .block{
                break-inside: avoid;
                width: 24rem;

                h3 {
                    color: #006648;
                    font-size: 1.4rem;
                    margin: 0 0 1rem;

                    svg {
                        margin-right: 0.4rem;
                        vertical-align: baseline;
                    }
                }

                ul {
                    margin: 0 auto 3rem 2rem;
                    list-style: none;
                    padding: 0;
                    li {
                        border-bottom: 1px solid #555;
                        padding: 0.4rem 0;
                        line-height: 1.5rem;

                        .label {
                            display: inline-block;
                            width: 9rem;
                            vertical-align: top;
                        }

                        .value {
                            display: inline-block;
                            width: 12rem;
                            padding-left: 1rem;
                            vertical-align: top;
                        }
                    }
                }
            }
        }
    }
    .map{
        img{
            width: 100%;
            height: 28rem;
            display: block;
            object-fit: cover;
         }
    }
}

.article-container {
    p {
        font-size: 1.2rem;
        line-height: 1.8rem;
        margin: 0 0 1.2rem;
    }

    table {
        border-collapse: collapse;
        min-width: 45rem;
        margin: 2rem auto;
        font-size: 1.2rem;
    }
    th {
        text-align: left;
        padding: 0.5rem 1rem;
        border-bottom: 2px solid #aaa;
    }
    td {
        padding: 0.5rem 1rem;
        border-bottom: 1px solid #ccc;
    }
    ul {
        font-size: 1.2rem;
        line-height: 2rem;
        margin: 0 0 1.2rem;
        list-style: disc;
        padding-left: 2rem;
    }
}

.sidebar-layout{
    display: grid;
    grid-template-columns: 1fr 22rem;
    gap: 2rem;
    grid-template-areas: "contents sidebar";
    .sidebar{
        grid-area: sidebar;
    }
    .contents{
        grid-area: contents;
    }
    .contact {
        position: sticky;
        top: 2rem;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
                "title"
                "image"
                "phone"
                "email";
        width: 22rem;
        gap: 1rem;
        h2{
            font-size: 1.3rem;
            grid-area: title;
            margin: 0 0 0.75rem;
            text-align: center;
        }
        img {
            grid-area: image;
            width: 8rem;
            height: 8rem;
            border-radius: 50%;
            vertical-align: middle;
            margin: auto;
        }
        .tel, .email {
            font-size: 1.2rem;
            line-height: 2rem;
            color: #fff;
            display: block;
            background-color: #006648;
            border-radius: 0.5rem;
            padding: 0.5rem 1rem;
            text-decoration: none;
            text-align: center;
            margin: 0 1rem;
        }
        .tel {
            grid-area: phone;
        }
        .email {
            grid-area: email;
        }
        svg {
            font-size: 1.1rem;
            vertical-align: middle;
            margin-right: 0.5rem;
            line-height: 2.2rem;
        }

    }
}

.calculator-container {
    .results-separator {
        display: block;
        width: 3rem;
        height: 3rem;
        margin: 2rem auto;
        color: #006648;
    }
}

.calculator fieldset {
    border: 0 none;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;

    legend {
        font-size: 1.4rem;
        color: #006648;
        font-weight: bold;
        padding: 1rem 0 .5rem 1rem;
    }

    .field, dl{
        width: 18rem;
        background-color: rgba(0, 102, 72, 0.07);
        padding: 1rem;
        margin: 0;
    }

    dt{
        display: block;
        font-size: 1.1rem;
        line-height: 1.5rem;
        margin: 0 0 0.75rem;
    }
    dd {
        font-size: 1.4rem;
        padding: .5rem 0;
        color: #006648;
    }
    .comment {
        display: block;
        font-size: .9rem;
        margin-top: .5rem;
    }

    .field {
        label{
            display: block;
            font-size: 1.2rem;
            line-height: 1.5rem;
            margin: 0 0 0.75rem;
        }

        input[type="number"] {
            font-size: 1.4rem;
            padding: 0.5rem 0 .5rem .75rem;
            color: #006648;
            background-color: #fff;
            border-width: 0 0 1px;
            border-color: #006648;
            border-style: solid;
            width: 7rem;
            margin-right: .5rem;
            text-align: right;
        }
        input[type="checkbox"] {

        }
        .unit{
            font-size: 1.2rem;
            color: #006648;
        }
    }
}
.scenario {
    dl {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
        align-items: stretch;

        > div {
            width: 18rem;
            background-color: rgba(0, 102, 72, 0.07);
            padding: 1rem;
            margin: 0;

            &.outcome{
                width: 17.5rem;
                border-width: 0 0 0 .5rem;
                border-color: #006648;
                border-style: solid;
                margin-top: -1rem;

                dt {
                    font-size: 1.4rem;
                }
            }

            &.break{
                width: 100%;
                height: 0;
                padding: 0;
                margin:0;
                overflow: hidden;
            }
        }
    }
    dt{
        display: block;
        font-size: 1.1rem;
        line-height: 1.5rem;
        margin: 0 0 0.75rem;
    }
    dd {
        font-size: 1.4rem;
        padding: .5rem 0;
        color: #006648;
    }
}

footer{
    text-align: center;
}

@media (max-width: 1256px) {
    .container, header{
        width: 52rem;
    }
    .property-container {
        .hero {
            grid-template-columns: 1fr 1fr;
            grid-template-areas:
                "title title"
                "price location"
                "image image"
                "features features"
                "summary summary";
            .features {
                margin-top: 2rem;
                justify-content: center;
            }
        }
    }
    .sidebar-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "contents" "sidebar";

        .contact {
            position: static;
            width: auto;
            grid-template-columns: 1fr auto auto auto 1fr;
            grid-template-areas: ". image phone email .";
            gap: 0;
            img {
                width: 3rem;
                height: 3rem;
                margin: 0;
            }
            h2 {
                display: none;
            }
        }
        .sidebar{
            position: sticky;
            bottom: 0;
            background-color: #fff;
            padding: 1rem 0;
        }
    }
}

@media (max-width: 864px) {
    .container, header{
        width: auto;
        margin: 0 1rem 1rem;
    }
    .property-container {
        width: auto;
        margin: 0;
        .property-details-layout, .hero {
            padding: 0 1rem;
        }

        .property-details-layout {
            .details {
                column-width: auto;
                column-gap: 0;
                .block {
                    width: auto;
                    ul > li > .label,ul > li > .value {
                        width: 45%;
                    }
                }
            }
        }
    }

    .sidebar-layout {
        .contact {
            display: flex;
            flex-wrap: nowrap;
            justify-content: center;
            width: 100%;
            .tel, .email {
                max-width: calc(50vw - 7rem);
                flex-shrink: 1;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
        }
    }

    .article-container {
        table {
            min-width: auto;
        }
    }
}

@media (max-width: 608px) {
    header .slogan {
        font-size: 1.6rem;
        line-height: 2rem;
    }
    .property-container {
        .hero {
            grid-template-columns: 1fr;
            grid-template-areas:
                "title"
                "price"
                "location"
                "image"
                "features"
                "summary";
            h1 {
                font-size: 1.8rem;
                margin-bottom: 1rem;
            }
            .location {
                padding-bottom: 1rem;
            }
            h1::after{
                width: auto;
            }
        }
    }
}
@media (max-width: 504px) {
    html, body {
        font-size: 14px;
    }
}