:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #2563eb;
}

* {
    box-sizing: border-box;
}

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

.page {
    min-height: 100vh;
    padding: 36px 18px;
}

.container {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

/* Отступ под шапкой */
.header {
    margin-bottom: 32px;
    padding-top: 38px;
}

/* padding - высота шапки */
.header-top {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 20;
    width: calc(100% - 36px);
    max-width: 920px;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-top: 12px;    /* оставить как есть */
    padding-bottom: 12px;  /* уменьшить */
    background: rgba(246, 247, 251, 0.94);
    backdrop-filter: blur(14px);
}

/* Расстояние между шапкой и кнопками */
.header-bottom {
    margin-top: 0px;
    padding-top: 0px;    /* оставить как есть */
    padding-bottom: 0px;  /* уменьшить */
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
}

.logo-image {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.brand-block {
    display: grid;
    gap: 10px;
}

.bot-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bot-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--text);
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.bot-links a:hover {
    background: var(--primary);
}

.nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.nav a:hover {
    color: var(--primary);
}

.document {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 38px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

h1 {
    margin: 0 0 18px;
    font-size: 38px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

p {
    margin: 0 0 14px;
}

.lead {
    color: var(--muted);
    font-size: 19px;
}

.link-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.link-list a {
    display: block;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
}

.link-list a:hover {
    border-color: #bfdbfe;
    color: var(--primary);
}

.back-link {
    display: inline-flex;
    margin-top: 26px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.footer {
    margin-top: 26px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 720px) {
    .page {
        padding: 22px 14px;
    }

    .header {
        padding-top: 122px;
    }

    .nav {
        justify-content: flex-start;
    }

    .bot-links {
        padding-left: 0;
    }

    .document {
        padding: 26px;
        border-radius: 20px;
    }

    h1 {
        font-size: 32px;
    }
}

.legal-document {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 42px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.legal-document h1 {
    margin-bottom: 28px;
}

.legal-document h2 {
    margin: 34px 0 14px;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.legal-document h3 {
    margin: 26px 0 12px;
    font-size: 20px;
    line-height: 1.3;
}

.legal-document p {
    margin: 0 0 14px;
}

.legal-document ul {
    margin: 0 0 18px 22px;
    padding: 0;
}

.legal-document li {
    margin-bottom: 8px;
}

.requisites {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid var(--border);
}

@media (max-width: 720px) {
    .legal-document {
        padding: 26px;
        border-radius: 20px;
    }

    .legal-document h2 {
        font-size: 21px;
    }
}

@media (max-width: 720px) {
    .page {
        padding: 0;
    }

    /* Уменьшаем padding top */
    .container {
        width: 100%;
        max-width: none;
        padding-top: 88px;
    }

    .header {
        position: static;
        display: block;
        margin: 0 0 22px;
        padding: 0 18px;
        background: transparent;
        backdrop-filter: none;
    }

    .header-top {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 50;
        width: 100%;
        max-width: none;
        transform: none;
        display: grid;
        gap: 8px;
        padding: 8px 18px 9px;
        background: rgba(246, 247, 251, 0.96);
        backdrop-filter: blur(14px);
    }

    .logo {
        order: 1;
        gap: 9px;
        font-size: 18px;
        line-height: 1.15;
        white-space: nowrap;
    }

    .logo-image {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
    }

    .header-bottom {
        margin: 0;
        padding: 0;
    }

    .bot-links {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .bot-links a {
        min-height: 30px;
        padding: 6px 12px;
        font-size: 13px;
    }

    .nav {
        order: 2;
        display: flex;
        justify-content: flex-start;
        gap: 16px;
        flex-wrap: nowrap;
    }

    .nav a {
        font-size: 14px;
        line-height: 1.2;
    }

    .document,
    .legal-document {
        width: 100%;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        padding: 26px 24px;
        box-shadow: none;
    }

    .document h1,
    .legal-document h1 {
        font-size: 29px;
        line-height: 1.12;
        margin-bottom: 22px;
    }

    .legal-document h2 {
        font-size: 20px;
        line-height: 1.25;
        margin: 28px 0 12px;
    }

    .legal-document h3 {
        font-size: 18px;
    }

    .document p,
    .legal-document p,
    .legal-document li {
        font-size: 15px;
        line-height: 1.55;
    }

    .lead {
        font-size: 16px;
    }

    .link-list a {
        font-size: 15px;
        padding: 14px 16px;
    }
}

.price-list {
    display: grid;
    gap: 12px;
}

.price-row {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    font-size: 17px;
    line-height: 1.4;
}

.price-row strong {
    font-weight: 800;
}

@media (max-width: 720px) {
    .price-list {
        gap: 10px;
    }

    .price-row {
        padding: 12px 14px;
        font-size: 15px;
    }
}

.price-list {
    display: grid;
    gap: 12px;
}

.price-row {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text);
    font-size: 17px;
    line-height: 1.4;
}

.price-row strong {
    font-weight: 800;
}

@media (max-width: 720px) {
    .price-list {
        gap: 10px;
    }

    .price-row {
        padding: 12px 14px;
        font-size: 15px;
        line-height: 1.35;
    }
}

.price-note {
    margin: -10px 0 26px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.45;
}

.price-section-title {
    margin: 18px 0 2px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.price-section-title:first-child {
    margin-top: 0;
}

@media (max-width: 720px) {
    .price-note {
        margin: -8px 0 20px;
        font-size: 14px;
    }

    .price-section-title {
        margin: 16px 0 0;
        font-size: 18px;
    }
}

.service-summary {
    margin-bottom: 22px;
}

.service-summary p {
    margin-bottom: 6px;
}

.requisites a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.requisites a:hover {
    text-decoration: underline;
}

.top-back-link {
    margin-top: 0;
    margin-bottom: 24px;
}