.hlp-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f2f5 0%, #ffffff 40%, #e8ecf4 100%);
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    padding: 24px 20px 64px;
}

.hlp-shell {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.hlp-top {
    text-align: center;
    margin-bottom: 28px;
}

.hlp-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7C4DFF, #5C6BC0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 6px;
}

.hlp-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0 0 22px;
}

.hlp-search {
    position: relative;
    max-width: 620px;
    margin: 0 auto;
}

.hlp-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    pointer-events: none;
}

.hlp-search input {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 48px 16px 50px;
    font-family: inherit;
    font-size: 1.05rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.hlp-search input::placeholder {
    color: #9aa1ad;
}

.hlp-search input:focus {
    border-color: rgba(124, 77, 255, 0.55);
    box-shadow: 0 6px 26px rgba(124, 77, 255, 0.18);
}

.hlp-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
}

.hlp-search-clear:hover {
    background: rgba(0, 0, 0, 0.11);
}

.hlp-search-clear svg {
    width: 15px;
    height: 15px;
}

.hlp-search.is-filled .hlp-search-clear {
    display: flex;
}

.hlp-hint {
    margin: 12px 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-height: 20px;
}

.hlp-hint b {
    color: var(--accent-purple);
}

.hlp-body {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.hlp-nav {
    position: sticky;
    top: 20px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

.hlp-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.hlp-nav a svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.hlp-nav a:hover {
    background: rgba(124, 77, 255, 0.08);
    color: var(--accent-purple);
}

.hlp-nav a.is-active {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.14), rgba(92, 107, 192, 0.14));
    color: var(--accent-purple);
}

.hlp-nav a.is-empty {
    opacity: 0.35;
    pointer-events: none;
}

.hlp-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 26px 28px;
    margin-bottom: 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
    scroll-margin-top: 20px;
}

.hlp-h2 {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--text-primary);
}

.hlp-h2 svg {
    width: 22px;
    height: 22px;
    color: var(--accent-purple);
    flex: 0 0 auto;
}

.hlp-section-note {
    margin: 0 0 18px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.hlp-article {
    padding: 18px 0 0;
    border-top: 1px solid var(--glass-border);
    scroll-margin-top: 20px;
}

.hlp-article + .hlp-article {
    margin-top: 18px;
}

.hlp-article h3 {
    font-size: 1.06rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px;
    line-height: 1.35;
}

.hlp-article mark {
    background: rgba(124, 77, 255, 0.2);
    color: inherit;
    border-radius: 4px;
    padding: 0 2px;
}

.hlp-text {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.hlp-text p {
    margin: 0 0 10px;
}

.hlp-text p:last-child {
    margin-bottom: 0;
}

.hlp-text b {
    color: var(--text-primary);
}

.hlp-text a {
    color: var(--accent-purple);
    font-weight: 700;
    text-decoration: none;
}

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

.hlp-text code {
    background: rgba(124, 77, 255, 0.1);
    border-radius: 6px;
    padding: 2px 7px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.hlp-text ul,
.hlp-text ol {
    margin: 10px 0;
    padding-left: 0;
    list-style: none;
}

.hlp-text li {
    position: relative;
    padding: 5px 0 5px 24px;
    line-height: 1.55;
}

.hlp-text ul li::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

.hlp-text ol {
    counter-reset: hlp-step;
}

.hlp-text ol li {
    counter-increment: hlp-step;
    padding-left: 30px;
}

.hlp-text ol li::before {
    content: counter(hlp-step);
    position: absolute;
    left: 0;
    top: 6px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.hlp-note {
    margin: 12px 0 0;
    padding: 11px 14px;
    border-left: 3px solid var(--accent-purple);
    background: rgba(124, 77, 255, 0.06);
    border-radius: 0 10px 10px 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

.hlp-table-wrap {
    overflow-x: auto;
    margin: 14px 0;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    -webkit-overflow-scrolling: touch;
}

.hlp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.6);
}

.hlp-table th,
.hlp-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    overflow-wrap: anywhere;
}

.hlp-table td + td,
.hlp-table th + th {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hlp-table thead th {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.12), rgba(92, 107, 192, 0.12));
    font-weight: 800;
    color: var(--text-primary);
}

.hlp-table tbody tr:last-child td {
    border-bottom: none;
}

.hlp-table tbody tr:hover {
    background: rgba(124, 77, 255, 0.05);
}

.hlp-empty {
    display: none;
    text-align: center;
    padding: 44px 20px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

.hlp-empty svg {
    width: 42px;
    height: 42px;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-bottom: 12px;
}

.hlp-empty h3 {
    margin: 0 0 8px;
    font-size: 1.12rem;
    font-weight: 800;
}

.hlp-empty p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.6;
}

.hlp-empty a {
    color: var(--accent-purple);
    font-weight: 700;
    text-decoration: none;
}

.hlp-contact {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 26px 0 0;
}

.hlp-contact a {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 700;
}

.hlp-contact a:hover {
    text-decoration: underline;
}

.hlp-footer {
    text-align: center;
    margin-top: 26px;
}

.hlp-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    border-radius: 14px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hlp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 77, 255, 0.35);
}

@media (max-width: 900px) {
    .hlp-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .hlp-nav {
        position: sticky;
        top: 0;
        z-index: 5;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 8px;
        border-radius: 14px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .hlp-nav::-webkit-scrollbar {
        display: none;
    }

    .hlp-nav a {
        white-space: nowrap;
        padding: 8px 13px;
        font-size: 0.9rem;
    }

    .hlp-nav a span {
        display: inline;
    }
}

@media (max-width: 640px) {
    .hlp-page {
        padding: 14px 10px 52px;
    }

    .hlp-top {
        margin-bottom: 16px;
    }

    .hlp-title {
        font-size: 1.5rem;
        margin-bottom: 2px;
    }

    .hlp-sub {
        font-size: 0.9rem;
        margin-bottom: 14px;
    }

    .hlp-search input {
        font-size: 0.95rem;
        padding: 12px 40px 12px 42px;
        border-radius: 12px;
    }

    .hlp-search-icon {
        left: 14px;
        width: 17px;
        height: 17px;
    }

    .hlp-hint {
        margin-top: 8px;
        font-size: 0.85rem;
        min-height: 0;
    }

    .hlp-body {
        gap: 12px;
    }

    .hlp-nav {
        padding: 6px;
        border-radius: 12px;
        gap: 4px;
    }

    .hlp-nav a {
        padding: 7px 11px;
        font-size: 0.85rem;
        gap: 7px;
        border-radius: 9px;
    }

    .hlp-nav a svg {
        width: 15px;
        height: 15px;
    }

    .hlp-section {
        padding: 16px 14px;
        border-radius: 14px;
        margin-bottom: 12px;
        scroll-margin-top: 62px;
    }

    .hlp-h2 {
        font-size: 1.08rem;
        gap: 9px;
    }

    .hlp-h2 svg {
        width: 19px;
        height: 19px;
    }

    .hlp-section-note {
        margin-bottom: 12px;
        font-size: 0.88rem;
    }

    .hlp-article {
        padding-top: 13px;
        scroll-margin-top: 62px;
    }

    .hlp-article + .hlp-article {
        margin-top: 13px;
    }

    .hlp-article h3 {
        font-size: 0.98rem;
        margin-bottom: 6px;
    }

    .hlp-text {
        font-size: 0.94rem;
        line-height: 1.6;
    }

    .hlp-text li {
        padding: 4px 0 4px 21px;
    }

    .hlp-text ol li {
        padding-left: 27px;
    }

    .hlp-note {
        padding: 9px 12px;
        font-size: 0.88rem;
        margin-top: 10px;
    }

    .hlp-table-wrap {
        margin: 12px 0;
        border-radius: 10px;
    }

    .hlp-table {
        font-size: 0.86rem;
    }

    .hlp-table th,
    .hlp-table td {
        padding: 8px 10px;
    }

    .hlp-empty {
        padding: 32px 16px;
        border-radius: 14px;
    }

    .hlp-contact {
        font-size: 0.88rem;
        margin-top: 18px;
    }

    .hlp-footer {
        margin-top: 18px;
    }

    .hlp-btn {
        display: block;
        padding: 13px 20px;
        border-radius: 12px;
    }
}

/* Разметка страницы правил (rules.html) */
.faq-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f2f5 0%, #ffffff 40%, #e8ecf4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-y: scroll;
}

.faq-container {
    width: 100%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 32px;
}

.faq-header {
    text-align: center;
    margin-bottom: 24px;
}

.faq-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7C4DFF, #FF6B9D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px;
}

.faq-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin: 0;
}

.faq-contact {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 24px 0 0;
    line-height: 1.5;
}

.faq-contact a {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
}

.faq-contact a:hover {
    text-decoration: underline;
}

.faq-footer {
    text-align: center;
    margin-top: 28px;
}

.faq-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    border-radius: 14px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.25);
}

.faq-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 77, 255, 0.35);
}

@media (max-width: 640px) {
.faq-container {
        padding: 20px 16px;
        border-radius: 18px;
    }
.faq-title {
        font-size: 1.4rem;
    }
}
