/* ==========================================================
   Конструктор договора хоумстейджинга
   Используются только локальные классы hs-*
   ========================================================== */

.page-break{
    page-break-before: always;
    break-before: page;
    display:block;
    height:0;
    margin:0;
    border:0;
}

@media screen{
    .page-break{
        height:1px;
        margin:36px 0;
        border-top:1px dashed #bbb;
    }
}

.hs-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.hs-form {
    width: 380px;
    flex: 0 0 380px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: sticky;
    top: 20px;
    padding-right: 10px;
}

.hs-preview {
    flex: 1 1 auto;
    min-width: 0;
}

/* На широких экранах предпросмотр примерно вдвое шире формы */
@media (min-width: 1200px){
    .layout-medium:has(.hs-layout),
    .entry-content:has(.hs-layout){
        max-width: min(1600px, 96vw);
        width: 100%;
    }

    .hs-form{
        width: 360px;
        flex: 0 0 360px;
    }

    .hs-preview{
        flex: 2 1 0;
        min-width: 0;
    }
}

@media (min-width: 1600px){
    .layout-medium:has(.hs-layout),
    .entry-content:has(.hs-layout){
        max-width: min(1900px, 98vw);
    }
}

.hs-card{
    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;
    padding:20px;
    margin-bottom:20px;
}

.hs-card h2{
    margin:0 0 20px;
    font-size:22px;
}

.hs-notice{
    background:#f8f8f8;
    border-left:4px solid #999;
    padding:15px 18px;
    margin-bottom:25px;
}

.hs-intro{
    margin:0 0 24px;
}

.hs-intro p{
    margin:0 0 12px;
    line-height:1.5;
}

.hs-benefits{
    margin:0 0 28px;
    padding:18px 20px;
    background:#f7f7f7;
    border:1px solid #e5e5e5;
}

.hs-benefits h2{
    margin:0 0 12px;
    font-size:22px;
}

.hs-benefits-list{
    list-style:none;
    margin:0;
    padding:0;
}

.hs-benefits-list li{
    position:relative;
    padding:4px 0 4px 1.4em;
    line-height:1.4;
}

.hs-benefits-list li::before{
    content:"✓";
    position:absolute;
    left:0;
    top:4px;
}

.hs-constructor-title{
    margin:0 0 16px;
    font-size:24px;
}

.hs-faq{
    margin-top:36px;
}

.hs-faq h2{
    margin:0 0 16px;
}

.hs-faq h3{
    margin:18px 0 8px;
    font-size:18px;
}

.hs-faq p{
    margin:0 0 8px;
    line-height:1.5;
}

.hs-group{
    margin-bottom:20px;
}

.hs-group label{
    display:block;
    font-weight:600;
    margin-bottom:6px;
}

.hs-group input,
.hs-group select,
.hs-group textarea{
    width:100%;
    box-sizing:border-box;
    padding:10px 12px;
}

.hs-group textarea{
    resize:vertical;
    min-height:90px;
}

.hs-checkboxes{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.hs-checkboxes label{
    display:flex;
    align-items:flex-start;
    gap:8px;
    font-weight:400;
    margin:0;
}

.hs-checkboxes input[type="checkbox"]{
    width:auto;
    margin-top:3px;
    flex:0 0 auto;
}

.hs-buttons{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:25px;
}

.hs-buttons button{
    width:100%;
}

.hs-buttons button:disabled{
    opacity:0.45;
    cursor:not-allowed;
}

.hs-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
    font-size:14px;
    color:#666;
}

.hs-document{
    background:#fff;
    border:1px solid #ddd;
    padding:40px;
    min-height:1000px;
    box-sizing:border-box;
    font-family:"Times New Roman",Times,serif;
    font-size:12pt;
    line-height:1.35;
    color:#000;
    width:100%;
    max-width:100%;
}

.hs-document h1{
    text-align:center;
    margin-top:0;
    font-family:"Times New Roman",Times,serif;
}

.hs-document h2{
    font-family:"Times New Roman",Times,serif;
    text-align:center;
}

.hs-document h3{
    font-family:"Times New Roman",Times,serif;
    text-align:left;
    margin:0.8em 0 0.4em;
}

.hs-document p{
    text-align:justify;
    margin:0 0 0.65em;
}

.hs-document ul{
    list-style:none;
    margin:0.2em 0 0.55em;
    padding-left:1.4em;
    line-height:1.15;
}

.hs-document ul > li{
    position:relative;
    text-align:justify;
    margin:0;
    padding:0 0 0 0.15em;
    line-height:1.15;
}

.hs-document ul > li::before{
    content:"—";
    position:absolute;
    left:-1.25em;
    width:1em;
}

.hs-document ul ul{
    margin:0.1em 0 0.15em;
}

.hs-appendix-header{
    margin:0 0 1em;
}

.hs-appendix-num{
    text-align:right;
    font-weight:700;
    font-size:14pt;
    margin:0 0 0.35em;
}

.hs-appendix-title{
    text-align:center;
    font-weight:700;
    font-size:16pt;
    margin:0 0 0.5em;
    font-family:"Times New Roman",Times,serif;
}

.hs-document table,
.hs-document table.hs-table{
    width:100%;
    max-width:100%;
    border-collapse:collapse;
    table-layout:fixed;
    margin:0 0 0.75em;
}

.hs-document td,
.hs-document th{
    padding:4px 6px;
    vertical-align:top;
    text-align:left;
    border:1px solid #000;
    line-height:1.2;
    word-wrap:break-word;
    overflow-wrap:break-word;
}

.hs-document th{
    font-weight:700;
    width:32%;
}

.hs-document table.hs-table-goals{
    table-layout:auto;
}

.hs-document table.hs-table-goals td{
    border:1px solid #000;
    padding:3px 6px;
    vertical-align:middle;
}

.hs-document table.hs-table-goals .hs-check{
    width:1.6em;
    text-align:center;
    font-size:14pt;
    line-height:1;
    padding:2px 4px;
}

.hs-document table.hs-table-stages th{
    width:auto;
}

.hs-document table.hs-table-stages td,
.hs-document table.hs-table-stages th{
    font-size:11pt;
    padding:3px 4px;
}

.hs-document table.hs-sign-table td,
.hs-document table.hs-sign-table th{
    border:none;
    padding:4px 8px 4px 0;
    vertical-align:top;
    text-align:left;
}

.hs-document table.hs-sign-table .hs-sign-gap{
    height:2.2em;
}

/* Термины и определения: термин — определение */
.hs-document table.hs-terms{
    width:100%;
    border-collapse:collapse;
    margin:0 0 1em;
    table-layout:fixed;
}

.hs-document table.hs-terms td{
    border:none;
    padding:0.15em 0;
    vertical-align:top;
    line-height:1.25;
}

.hs-document table.hs-terms .hs-term{
    width:28%;
    white-space:normal;
    font-weight:700;
    text-align:left;
    padding-right:0.5em;
}

.hs-document table.hs-terms .hs-term-def{
    width:72%;
    text-align:justify;
}

.hs-document a{
    color:#000;
    text-decoration:underline;
    word-break:break-all;
}

@media (max-width:960px){

    .hs-layout{
        flex-direction:column;
    }

    .hs-form{
        width:100%;
        flex:none;
        position:static;
    }

    .hs-preview{
        width:100%;
        flex:none;
    }

    .hs-document{
        padding:20px;
    }

}

@media print{

    .site-header,
    .site-footer,
    .sidebar,
    .hs-form,
    .hs-toolbar,
    .breadcrumbs,
    nav{
        display:none!important;
    }

    .hs-layout{
        display:block;
    }

    .hs-document{
        border:none;
        padding:0;
        margin:0;
    }

}
