/* ============================================================
   Окупаем — служебные страницы: рубрика, поиск, страницы, 404.
   Значения 1:1 из макета «служебные страницы».
   ============================================================ */

.okp-page {
    max-width: var(--w-article);
    margin: 0 auto;
    padding: 20px 20px 28px;
}

/* ── Рубрика ── */
.okp-tag-meta {
    display: flex;
    align-items: center;
    gap: 9px;
}

.okp-tag-count {
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}

.okp-page-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 34px;
    line-height: 1.05;
    color: var(--fg);
    margin-top: 10px;
}

.okp-page-desc {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 16.5px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: 10px;
    text-wrap: pretty;
}

.okp-tag-list {
    margin-top: 20px;
    border-top: 1px solid var(--fg);
}

.okp-tag-list .okp-archive-meta {
    margin-top: 10px;
}

/* ── Пагинация: квадраты 44px, активная залита графитом ── */
.okp-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.okp-page-num-wrap {
    display: flex;
    gap: 6px;
}

.okp-page-btn,
.okp-page-num {
    width: var(--tap-min);
    height: var(--tap-min);
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 14px;
    color: var(--fg);
}

.okp-page-btn svg {
    width: 16px;
    height: 16px;
}

.okp-page-btn:hover,
.okp-page-num:hover {
    border-color: var(--green);
    color: var(--green);
}

.okp-page-btn.is-disabled {
    color: var(--muted);
    opacity: .5;
    pointer-events: none;
}

.okp-page-num.is-active {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
    pointer-events: none;
}

/* ── Поиск ── */
.okp-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    border: 1px solid var(--fg);
    border-radius: var(--radius-m);
    padding: 0 16px;
    margin-top: 14px;
    background: var(--surface);
}

.okp-search-box svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    color: var(--muted);
}

.okp-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: var(--font-text);
    font-weight: 500;
    font-size: 16px;
    color: var(--fg);
    outline: none;
    caret-color: var(--green);
}

.okp-search-clear {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    display: grid;
    place-items: center;
    color: var(--muted);
    cursor: pointer;
}

.okp-search-clear svg {
    width: 16px;
    height: 16px;
    color: currentColor;
}

.okp-search-count {
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 18px;
    min-height: 15px;
}

.okp-search-results {
    margin-top: 8px;
    border-top: 1px solid var(--fg);
}

.okp-search-results:empty {
    border-top: none;
}

.okp-search-item {
    display: block;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.okp-search-item .okp-related-meta .okp-rubric {
    font-weight: 600;
}

.okp-search-item h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 17px;
    line-height: 1.16;
    color: var(--fg);
    margin-top: 5px;
    text-wrap: pretty;
}

.okp-search-item:hover h3 {
    color: var(--green);
}

.okp-search-snippet {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--muted);
    margin-top: 5px;
}

.okp-search-chips-label {
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 22px;
}

.okp-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.okp-search-chips a,
.okp-search-chips button {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: transparent;
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 13px;
    color: var(--fg);
    cursor: pointer;
}

.okp-search-chips a:hover,
.okp-search-chips button:hover {
    border-color: var(--green);
    color: var(--green);
}

.okp-search-note {
    font-family: var(--font-text);
    font-weight: 500;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: 18px;
}

/* ── Обычная страница («О проекте» и др.) ── */
.okp-page .okp-prose {
    padding: 16px 0 0;
}

/* ── 404 ── */
.okp-404 {
    padding-top: 44px;
    display: flex;
    flex-direction: column;
}

.okp-404-digit {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 96px;
    line-height: .95;
    letter-spacing: -.01em;
    color: var(--fg);
}

.okp-404-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 24px;
    line-height: 1.12;
    color: var(--fg);
    margin-top: 14px;
    text-wrap: pretty;
}

.okp-404-text {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 16.5px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: 10px;
    text-wrap: pretty;
}

.okp-404-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 48px;
    background: var(--green);
    color: var(--on-green);
    border-radius: 9px;
    margin-top: 20px;
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 15px;
}

.okp-404-btn:hover {
    opacity: .92;
    color: var(--on-green);
}

.okp-404-list {
    margin-top: 28px;
    border-top: 1px solid var(--fg);
    padding-top: 4px;
}

.okp-404-label {
    font-family: var(--font-text);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--fg);
    padding-top: 12px;
}

@media (min-width: 720px) {
    .okp-page {
        padding-top: 32px;
    }

    .okp-page-title {
        font-size: 44px;
    }

    .okp-404-digit {
        font-size: 140px;
    }
}
