:root {
    --background: #f6f7f9;
    --card: #ffffff;
    --text: #17191c;
    --muted: #6b7280;
    --border: #e1e4e8;
    --primary: #111827;
    --primary-hover: #252d3a;
    --danger: #dc2626;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.5;
    
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

button,
input,
textarea {
    font-family: inherit;
}

/* =========================
   HEADER
   ========================= */

.site-header {
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    width: min(980px, calc(100% - 32px));
    height: 100%;
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--text);
    text-decoration: none;

    font-size: 20px;
    font-weight: 700;
}

.logo-icon {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: var(--primary);
    color: white;

    font-size: 14px;
}


/* =========================
   DOCUMENT NAVIGATION
   ========================= */

.document-nav {
    display: flex;
    gap: 4px;

    padding: 4px;

    background: #f1f2f4;
    border-radius: 9px;
}

.nav-link {
    padding: 6px 16px;

    border-radius: 7px;

    color: var(--muted);
    text-decoration: none;

    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    background: white;
    color: var(--text);

    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}


/* =========================
   CONTAINER
   ========================= */

.container {
    width: min(980px, calc(100% - 32px));
    margin: auto;
    flex: 1;
}


/* =========================
   PAGE HEADER
   ========================= */

.page-header {
    padding: 42px 0 28px;
    text-align: center;
}

.page-header h1 {
    margin: 0 0 8px;

    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -.5px;
}

.page-header p {
    margin: 0;

    color: var(--muted);
    font-size: 15px;
}


/* =========================
   FORM CARD
   ========================= */

.form-card {
    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    padding: 32px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
}


/* =========================
   PARTIES
   ========================= */

.parties-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}


/* =========================
   FORM SECTION
   ========================= */

.form-section {
    border: 0;
    padding: 0;
    margin: 0 0 32px;
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.form-section legend {
    width: 100%;

    padding: 0;
    margin-bottom: 18px;

    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 17px;
    font-weight: 650;
}

.section-number {
    width: 25px;
    height: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f1f2f4;
    color: #4b5563;

    font-size: 12px;
    font-weight: 700;
}


/* =========================
   FORM GRID
   ========================= */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}


/* =========================
   FORM FIELDS
   ========================= */

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin-bottom: 14px;
}

.form-field label {
    color: #34383e;

    font-size: 13px;
    font-weight: 500;
}

.form-field input,
.form-field textarea {
    width: 100%;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: white;
    color: var(--text);

    outline: none;

    font-size: 14px;

    transition:
        border-color .15s,
        box-shadow .15s;
}

.form-field input {
    height: 46px;
    padding: 0 13px;
}

.form-field textarea {
    min-height: 76px;
    padding: 10px 12px;

    resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #a0a5ad;
}

.form-field input:hover,
.form-field textarea:hover {
    border-color: #c5c9cf;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: #6b7280;

    box-shadow:
        0 0 0 3px rgba(107, 114, 128, .12);
}


/* =========================
   PRICE
   ========================= */

.price-input-large {
    position: relative;
}

.price-input-large input {
    width: 100%;
    height: 46px;

    padding: 0 38px 0 13px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: white;
    color: var(--text);

    outline: none;

    font-size: 15px;

    transition:
        border-color .15s,
        box-shadow .15s;
}

.price-input-large input:hover {
    border-color: #c5c9cf;
}

.price-input-large input:focus {
    border-color: #6b7280;

    box-shadow:
        0 0 0 3px rgba(107, 114, 128, .12);
}

.price-input-large span {
    position: absolute;

    right: 14px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--muted);

    font-size: 14px;
    font-weight: 500;

    pointer-events: none;
}


/* =========================
   SERVICES / ITEMS TABLE
   ========================= */

.services-section {
    margin-top: 4px;
}

.table-wrapper {
    overflow-x: auto;

    border: 1px solid var(--border);
    border-radius: 9px;
}

.items-table {
    width: 100%;
    min-width: 720px;

    border-collapse: collapse;
}

.items-table th {
    padding: 11px 10px;

    background: #f8f9fa;

    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.items-table td {
    padding: 8px;

    border-bottom: 1px solid #eef0f2;
}

.items-table tbody tr:last-child td {
    border-bottom: 0;
}

.items-table input {
    width: 100%;
    height: 40px;

    padding: 0 9px;

    border: 1px solid transparent;
    border-radius: 6px;

    background: #f8f9fa;

    outline: none;

    font-size: 13px;

    transition:
        border-color .15s,
        background .15s,
        box-shadow .15s;
}

.items-table input:hover {
    border-color: var(--border);
}

.items-table input:focus {
    background: white;

    border-color: #9ca3af;

    box-shadow:
        0 0 0 2px rgba(107, 114, 128, .1);
}


/* Table columns */

.number-column {
    width: 42px;
}

.quantity-column {
    width: 110px;
}

.unit-column {
    width: 90px;
}

.price-column {
    width: 140px;
}

.action-column {
    width: 45px;
}

.row-number {
    color: var(--muted);

    font-size: 13px;
    text-align: center;
}


/* Table price */

.price-input {
    position: relative;
}

.price-input input {
    padding-right: 28px;
}

.price-input span {
    position: absolute;

    right: 9px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--muted);

    font-size: 12px;

    pointer-events: none;
}


/* Remove row */

.action-cell {
    text-align: center;
}

.remove-button {
    width: 32px;
    height: 32px;

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: #9ca3af;

    font-size: 20px;

    cursor: pointer;
}

.remove-button:hover {
    background: #fef2f2;
    color: var(--danger);
}


/* =========================
   ADD ITEM BUTTON
   ========================= */

.add-button {
    margin-top: 12px;

    padding: 8px 12px;

    border: 1px dashed #c7cbd1;
    border-radius: 7px;

    background: transparent;
    color: #4b5563;

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;
}

.add-button:hover {
    border-color: #9ca3af;
    background: #f8f9fa;
}

.add-button span {
    margin-right: 5px;

    font-size: 16px;
}


/* =========================
   FORM ACTIONS
   ========================= */

.form-actions {
    display: flex;
    gap: 10px;

    margin-top: 8px;
    padding-top: 24px;

    border-top: 1px solid var(--border);
}

.btn {
    height: 48px;

    padding: 0 20px;

    border: 0;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.btn-primary {
    text-decoration: none;
    flex: auto;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #f1f2f4;
    color: #34383e;
}

.btn-secondary:hover {
    background: #e6e8eb;
}

.arrow {
    font-size: 18px;
}

.form-hint {
    margin: 12px 0 0;

    text-align: center;

    color: var(--muted);

    font-size: 12px;
}


/* =========================
   BENEFITS
   ========================= */

.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;

    margin: 20px 0 50px;
}

.benefit {
    display: flex;
    gap: 10px;

    padding: 15px;

    background: white;

    border: 1px solid var(--border);
    border-radius: 10px;
}

.benefit-icon {
    font-size: 19px;
}

.benefit strong {
    display: block;

    margin-bottom: 2px;

    font-size: 12px;
}

.benefit span {
    display: block;

    color: var(--muted);

    font-size: 11px;
    line-height: 1.4;
}


/* =========================
   FOOTER
   ========================= */

.site-footer {
    padding: 24px 0;

    border-top: 1px solid var(--border);

    background: white;
    color: var(--muted);

    font-size: 12px;
}

.footer-inner {
    width: min(980px, calc(100% - 32px));
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-inner nav {
    display: flex;
    gap: 20px;
}

.footer-inner a {
    color: var(--muted);
    text-decoration: none;
}

.footer-inner a:hover {
    color: var(--text);
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {

    .container,
    .header-inner,
    .footer-inner {
        width: calc(100% - 24px);
    }

    .page-header {
        padding: 30px 0 22px;
    }

    .page-header h1 {
        font-size: 26px;
    }

    .form-card {
        padding: 22px 18px;
    }

    .parties-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .parties-grid {
        gap: 0;
    }

    .benefits {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
    }

}


/* =========================================
   HOME PAGE
   ========================================= */

.hero {
    padding: 64px 0 48px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.hero h1 {
    max-width: 800px;
    margin: 0 auto 20px;
    color: var(--text);
    font-size: 46px;
    line-height: 1.12;
    letter-spacing: -1.5px;
}

.hero-text {
    max-width: 680px;
    margin: 0 auto 40px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}


/* Document cards */

.document-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    text-align: left;
}

.document-card {
    display: flex;
    gap: 18px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        border-color .15s ease;
}

.document-card:hover {
    border-color: #c9cdd3;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
    transform: translateY(-2px);
}

.document-card-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    background: #f0f1f3;

    font-size: 21px;
    font-weight: 700;
}

.document-card-content {
    min-width: 0;
}

.document-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.document-card p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.document-card-link {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.document-card-link span {
    margin-left: 4px;
}


/* SEO text */

.seo-section,
.how-section,
.advantages-section,
.audience-section,
.faq-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 55px 0;
}

.seo-section {
    border-top: 1px solid var(--border);
}

.seo-section h2,
.how-section h2,
.advantages-section h2,
.audience-section h2,
.faq-section h2 {
    margin: 0 0 22px;
    font-size: 30px;
    letter-spacing: -.5px;
}

.seo-section p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.seo-section p:last-child {
    margin-bottom: 0;
}


/* How it works */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step {
    display: flex;
    gap: 14px;
}

.step-number {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: var(--primary);
    color: white;

    font-size: 14px;
    font-weight: 600;
}

.step h3 {
    margin: 0 0 7px;
    font-size: 16px;
}

.step p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}


/* Advantages */

.advantages-section {
    max-width: 1100px;
}

.advantages {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.advantage {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.advantage-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;
    background: #f0f1f3;

    font-size: 13px;
    font-weight: 700;
}

.advantage h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.advantage p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}


/* Audience */

.audience-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.audience-item {
    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 18px 20px;

    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
}

.audience-item strong {
    font-size: 15px;
}

.audience-item span {
    color: var(--muted);
    font-size: 14px;
}


/* FAQ */

.faq-list {
    border-top: 1px solid var(--border);
}

.faq-list details {
    border-bottom: 1px solid var(--border);
}

.faq-list summary {
    padding: 19px 4px;
    cursor: pointer;

    color: var(--text);
    font-size: 16px;
    font-weight: 500;

    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: "+";
    float: right;

    color: var(--muted);
    font-size: 20px;
    font-weight: 400;
}

.faq-list details[open] summary::after {
    content: "−";
}

.faq-list details p {
    max-width: 750px;
    margin: -4px 0 18px;
    padding-right: 30px;

    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}


/* Final CTA */

.final-cta {
    max-width: 900px;
    margin: 10px auto 70px;
    padding: 45px 30px;

    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);

    text-align: center;
}

.final-cta h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.final-cta p {
    margin: 0 0 24px;
    color: var(--muted);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}


/* Mobile */

@media (max-width: 700px) {

    .hero {
        padding: 40px 0 35px;
    }

    .hero h1 {
        font-size: 34px;
        letter-spacing: -1px;
    }

    .hero-text {
        font-size: 16px;
    }

    .document-cards {
        grid-template-columns: 1fr;
    }

    .seo-section,
    .how-section,
    .advantages-section,
    .audience-section,
    .faq-section {
        padding: 40px 0;
    }

    .seo-section h2,
    .how-section h2,
    .advantages-section h2,
    .audience-section h2,
    .faq-section h2 {
        font-size: 25px;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .advantages {
        grid-template-columns: 1fr 1fr;
    }

    .audience-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }
}


@media (max-width: 450px) {

    .advantages {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 30px;
    }

    .document-card {
        padding: 20px;
    }
}