/* MyLibrary — Сочинения по произведениям. Minimal hub + article styles. */

.mlb-essays-browser,
.mlb-essays-browser * {
    box-sizing: border-box;
}

.mlb-essays-tools {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto auto;
    gap: 12px;
    align-items: end;
    margin: 0 0 1.5rem;
    padding: 16px;
    border: 1px solid rgba(52, 74, 61, 0.14);
    border-radius: 18px;
    background: #f8fbf8;
}

.mlb-essays-tools__search span {
    display: block;
    margin-bottom: 6px;
    color: #43534a;
    font-size: 13px;
    font-weight: 700;
}

.mlb-essays-tools input {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid rgba(52, 74, 61, 0.22);
    border-radius: 12px;
    background: #fff;
    color: #26342c;
    font: inherit;
}

.mlb-essays-tools input:focus {
    outline: 2px solid rgba(111, 78, 242, 0.18);
    border-color: #6f4ef2;
}

.mlb-essays-tools button,
.mlb-essays-tools__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.mlb-essays-tools button {
    background: #6f4ef2;
    color: #fff;
}

.mlb-essays-tools button:hover,
.mlb-essays-tools button:focus-visible {
    background: #5838dc;
}

.mlb-essays-tools__reset {
    border: 1px solid #d7dce4;
    background: #fff;
    color: #4b5565;
}

.mlb-essays-tools__count {
    min-width: 112px;
    margin: 0 0 11px;
    white-space: nowrap;
    color: #536159;
}

.mlb-essays-catalog {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 0 0 1.8rem;
}

.mlb-essays-card {
    display: flex;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.mlb-essays-card:hover {
    transform: translateY(-3px);
    border-color: #c9c0fb;
    box-shadow: 0 16px 36px rgba(16, 24, 40, 0.10);
}

.mlb-essays-card__link {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 100%;
    padding: 1.35rem;
    color: inherit;
    text-decoration: none;
}

.mlb-essays-card__eyebrow {
    color: #6f4ef2;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mlb-essays-card h2,
#single .post-content .text .mlb-essays-card h2 {
    margin: 0.35rem 0 0.2rem;
    padding: 0;
    border: 0;
    color: #263b55;
    font-size: 1.35rem;
    line-height: 1.25;
    counter-increment: none;
}

.mlb-essays-card h2::before,
#single .post-content .text .mlb-essays-card h2::before {
    display: none;
    content: none;
}

.mlb-essays-card__author {
    margin: 0 0 0.75rem;
    color: #344054;
    font-weight: 700;
}

.mlb-essays-card__description {
    margin: 0 0 1rem;
    color: #667085;
    font-size: 0.95rem;
    line-height: 1.65;
}

.mlb-essays-card__footer {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    margin-top: auto;
    padding-top: 0.85rem;
}

.mlb-essays-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.mlb-essays-card__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 0.78rem;
    font-weight: 750;
}

.mlb-essays-card__footer > strong {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.78rem 0.95rem;
    border-radius: 12px;
    background: #6f4ef2;
    color: #fff;
    line-height: 1.2;
    transition: background-color 160ms ease, transform 160ms ease;
}

.mlb-essays-card:hover .mlb-essays-card__footer > strong {
    background: #5838dc;
    transform: translateY(-1px);
}

.mlb-essays-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 1.8rem 0 0;
}

.mlb-essays-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #d8dee8;
    border-radius: 11px;
    background: #fff;
    color: #3f4b5c;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.mlb-essays-pagination .page-numbers.current {
    border-color: #6f4ef2;
    background: #6f4ef2;
    color: #fff;
}

.mlb-essays-pagination a.page-numbers:hover,
.mlb-essays-pagination a.page-numbers:focus-visible {
    border-color: #b8aef4;
    color: #5838dc;
}

.mlb-essays-pagination .dots {
    border-color: transparent;
    background: transparent;
}

.mlb-essays-empty {
    padding: 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
}

/* Article */
.mlb-essay-lead,
.mlb-essay-example,
.mlb-essay-thesis {
    border-radius: 18px;
}

.mlb-essay-lead {
    margin: 0 0 1.9rem;
    padding: 20px 22px;
    border: 1px solid rgba(111, 78, 242, 0.14);
    background: linear-gradient(135deg, #f7f5ff 0%, #fbfcfe 100%);
}

.mlb-essay-lead p:last-child,
.mlb-essay-example p:last-child {
    margin-bottom: 0;
}

.mlb-essay-steps {
    display: grid;
    gap: 12px;
    margin: 1.2rem 0 1.9rem;
}

.mlb-essay-step {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 17px 18px;
    border: 1px solid #e3e7ed;
    border-radius: 16px;
    background: #fbfcfe;
}

.mlb-essay-step__number {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #6f4ef2;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
}

.mlb-essay-step h3 {
    margin: 0 0 0.35rem;
    font-size: 1.06rem;
}

.mlb-essay-step p {
    margin: 0;
}

.mlb-essay-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mlb-essay-table table {
    width: 100%;
    min-width: 690px;
    border-collapse: collapse;
}

.mlb-essay-table th,
.mlb-essay-table td {
    padding: 0.78rem 0.85rem;
    border: 1px solid #e3e7ed;
    vertical-align: top;
    text-align: left;
}

.mlb-essay-table thead th {
    background: #f5f6f8;
    color: #344054;
    font-weight: 850;
}

.mlb-essay-thesis {
    margin: 1.6rem 0;
    padding: 18px 20px;
    border-left: 5px solid #6f4ef2;
    background: #f7f5ff;
}

.mlb-essay-example {
    margin: 1.2rem 0 2rem;
    padding: clamp(18px, 3vw, 26px);
    border: 1px solid #e3e7ed;
    background: #fff;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.05);
}

@media (max-width: 760px) {
    .mlb-essays-tools {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .mlb-essays-tools__count {
        margin: 2px 0 0;
    }
    .mlb-essays-catalog {
        grid-template-columns: 1fr;
    }
    .mlb-essay-lead,
    .mlb-essay-example {
        padding: 16px;
    }
}

@media (max-width: 520px) {
    .mlb-essays-card__link,
    .mlb-essay-step {
        padding: 1rem;
    }
    .mlb-essay-step {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
    }
    .mlb-essay-step__number {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }
    .mlb-essay-table table {
        min-width: 610px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mlb-essays-card,
    .mlb-essays-card__footer > strong {
        transition: none;
    }
}

@media print {
    .mlb-essays-tools,
    .mlb-essays-pagination,
    .mlb-essays-card__footer > strong {
        display: none !important;
    }
    .mlb-essay-lead,
    .mlb-essay-example,
    .mlb-essay-thesis {
        box-shadow: none;
        background: #fff;
    }
}
