/* Epil: статьи из репозитория (шорткод [epil_article]) — рейтинги оборудования. Шрифты и шкала — из typography.css. */
.epil-article {
    --ea-text: var(--e-global-color-lcolor1, #374b5c);
    --ea-muted: var(--e-global-color-lcolor2, #73818c);
    --ea-line: #e6ebf1;
    --ea-soft: #f5f7fa;
    --ea-accent: var(--e-global-color-lprimary1, #e898f7);
    --ea-accent-soft: #fbf0fe;
    --ea-gold: #ffb800;
    --ea-green: #16a34a;
    --ea-amber: #b45309;

    max-width: 980px;
    margin: 0 auto;
    color: var(--ea-text);
    font-size: 17px;
    line-height: 1.7;
}

.epil-article p {
    margin: 0 0 16px;
}

.epil-article h2 {
    margin: 56px 0 18px;
    font-size: var(--epil-fs-h2, 32px);
    line-height: 1.2;
}

.epil-article h3 {
    margin: 32px 0 12px;
    font-size: var(--epil-fs-h4, 22px);
    line-height: 1.3;
}

.epil-article ul {
    margin: 0 0 16px;
    padding-left: 20px;
}

.epil-article li {
    margin: 0 0 6px;
}

.epil-article h1.epil-article__title {
    margin: 8px 0 20px;
    font-size: var(--epil-fs-h1, 44px);
    line-height: 1.15;
}

.epil-article__lead {
    margin: 0 0 24px;
    font-size: 19px;
    line-height: 1.65;
}

.epil-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 28px;
    color: var(--ea-muted);
    font-size: var(--epil-fs-sm, 14px);
}

/* Навигация по типам лазеров (над статьёй) */
.epil-laser-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 8px 0 36px;
}

.epil-article .epil-laser-nav__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 116px;
    padding: 16px 18px;
    border: 2px solid var(--ea-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    color: var(--ea-text);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.epil-article a.epil-laser-nav__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, .1);
}

.epil-laser-nav__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 18px;
}

.epil-laser-nav__icon svg {
    width: 72px;
    height: 72px;
}

.epil-laser-nav__item--alexandrite .epil-laser-nav__icon { background: linear-gradient(135deg, #f3e8ff, #d1fae5); }
.epil-laser-nav__item--diode .epil-laser-nav__icon { background: linear-gradient(135deg, #fee2e2, #dbeafe); }
.epil-laser-nav__item--nd-yag .epil-laser-nav__icon { background: linear-gradient(135deg, #ccfbf1, #ffedd5); }

.epil-laser-nav__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.epil-laser-nav__title {
    font-family: var(--epil-font-heading, inherit);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.epil-laser-nav__note {
    color: var(--ea-muted);
    font-size: var(--epil-fs-xs, 13px);
    line-height: 1.35;
}

.epil-article .epil-laser-nav__item.is-current {
    border-color: #a855f7;
    box-shadow: 0 14px 34px rgba(168, 85, 247, .18);
}

.epil-laser-nav__item.is-soon {
    cursor: default;
}

.epil-laser-nav__item.is-soon .epil-laser-nav__icon {
    filter: saturate(.75);
}

.epil-laser-nav__badge {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ea-soft);
    color: var(--ea-muted);
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 860px) {
    .epil-laser-nav {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .epil-article .epil-laser-nav__item {
        min-height: 0;
        padding: 10px 14px;
    }

    .epil-laser-nav__icon {
        width: 64px;
        height: 64px;
    }

    .epil-laser-nav__icon svg {
        width: 54px;
        height: 54px;
    }
}

/* Оглавление */
.epil-article__toc {
    margin: 0 0 40px;
    padding: 22px 26px;
    border-radius: 16px;
    background: var(--ea-soft);
}

.epil-article__toc-title {
    margin: 0 0 10px;
    font-family: var(--epil-font-heading, inherit);
    font-size: 16px;
    font-weight: 700;
}

.epil-article__toc ol {
    margin: 0;
    padding-left: 20px;
    columns: 2 260px;
    column-gap: 32px;
    font-size: 15px;
}

.epil-article__toc a {
    color: var(--ea-text);
    text-decoration: none;
    border-bottom: 1px solid var(--ea-line);
}

.epil-article__toc a:hover {
    border-color: var(--ea-accent);
}

/* Выноски */
.epil-callout {
    margin: 24px 0;
    padding: 18px 22px;
    border-left: 4px solid var(--ea-accent);
    border-radius: 0 14px 14px 0;
    background: var(--ea-accent-soft);
    font-size: 16px;
}

.epil-callout strong:first-child {
    display: block;
    margin-bottom: 4px;
    font-family: var(--epil-font-heading, inherit);
}

.epil-callout--note {
    border-left-color: #94a3b8;
    background: var(--ea-soft);
}

/* Карточка аппарата */
.epil-rating-card {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    margin: 40px 0;
    padding: 28px;
    border: 1px solid var(--ea-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .06);
    scroll-margin-top: 110px;
}

.epil-rating-card--top {
    border-color: color-mix(in srgb, var(--ea-gold) 55%, #fff);
    box-shadow: 0 22px 56px rgba(255, 184, 0, .14);
}

.epil-rating-card__media {
    position: relative;
    align-self: start;
    aspect-ratio: 6 / 5;
    overflow: hidden;
    border-radius: 18px;
    background: radial-gradient(120% 90% at 50% 20%, #fff 0%, #f1f4f8 70%, #e8edf3 100%);
}

.epil-rating-card__media:has(img) {
    background: #fff;
}

.epil-rating-card__img,
.epil-rating-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.epil-rating-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    color: #9aa7b4;
    font-family: var(--epil-font-heading, inherit);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.epil-rating-card__rank {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-family: var(--epil-font-heading, inherit);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
}

.epil-rating-card--top .epil-rating-card__rank {
    background: linear-gradient(135deg, #ffe14d, #ffb300);
    color: #1f2937;
}

.epil-rating-card__country {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.epil-flag {
    display: block;
    width: 24px;
    height: 16px;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .12);
}

.epil-rating-card__body {
    min-width: 0;
}

.epil-rating-card .epil-rating-card__name {
    margin: 0 0 6px;
    font-size: var(--epil-fs-h3, 28px);
    line-height: 1.2;
}

.epil-rating-card__maker {
    margin: 0 0 12px;
    color: var(--ea-muted);
    font-size: var(--epil-fs-sm, 14px);
}

.epil-rating-card__tagline {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

/* Ключевые параметры карточки */
.epil-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--ea-soft);
    font-size: 14px;
    line-height: 1.45;
}

.epil-specs dt {
    color: var(--ea-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.epil-specs dd {
    margin: 0 0 4px;
    font-weight: 600;
}

/* Оценки */
.epil-scores {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.epil-score {
    display: grid;
    grid-template-columns: 170px auto;
    gap: 2px 12px;
    align-items: baseline;
    font-size: 14px;
}

.epil-score__label {
    font-weight: 700;
}

.epil-score__stars {
    color: var(--ea-gold);
    font-size: 17px;
    letter-spacing: 2px;
    white-space: nowrap;
}

.epil-score__stars .is-off {
    color: #dfe5ec;
}

.epil-score__note {
    grid-column: 1 / -1;
    color: var(--ea-muted);
}

/* Плюсы и «что учитывать» */
.epil-proscons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 0;
}

.epil-proscons__box {
    padding: 16px 18px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.epil-proscons__box--pros {
    background: #f0fdf4;
}

.epil-proscons__box--cons {
    background: #fff7ed;
}

.epil-proscons__title {
    margin: 0 0 8px;
    font-family: var(--epil-font-heading, inherit);
    font-size: 15px;
    font-weight: 700;
}

.epil-article .epil-proscons ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.epil-proscons li {
    position: relative;
    margin: 0 0 6px;
    padding-left: 22px;
}

.epil-proscons__box--pros li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--ea-green);
    font-weight: 800;
}

.epil-proscons__box--cons li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--ea-amber);
    font-weight: 800;
}

.epil-rating-card__details {
    grid-column: 1 / -1;
    padding-top: 4px;
    border-top: 1px solid var(--ea-line);
}

.epil-rating-card__details h4 {
    margin: 18px 0 8px;
    font-size: 17px;
}

.epil-rating-card__details p {
    font-size: 16px;
}

.epil-class {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ea-soft);
    font-size: 12px;
    font-weight: 600;
}

/* Таблицы */
.epil-table-wrap {
    margin: 20px 0 28px;
    overflow-x: auto;
    border: 1px solid var(--ea-line);
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
}

.epil-article table.epil-table {
    width: 100%;
    min-width: 900px;
    margin: 0;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.45;
}

.epil-table th,
.epil-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ea-line);
    text-align: left;
    vertical-align: top;
}

.epil-table thead th {
    position: sticky;
    top: 0;
    background: var(--ea-soft);
    font-weight: 700;
    white-space: nowrap;
}

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

.epil-table td:first-child {
    font-weight: 800;
}

.epil-table--compact {
    min-width: 560px;
}

/* Выделенный блок (подменный аппарат) */
.epil-highlight {
    margin: 48px 0;
    padding: 30px 32px;
    border-radius: 24px;
    background: linear-gradient(135deg, #c55fe6 0%, #e898f7 55%, #f4c9fb 100%);
    color: #2a1236;
    box-shadow: 0 20px 48px rgba(197, 95, 230, .25);
}

.epil-highlight__kicker {
    display: inline-block;
    margin: 0 0 10px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.epil-article .epil-highlight .epil-highlight__title {
    margin: 0 0 14px;
    color: #1f0a29;
    font-size: var(--epil-fs-h3, 28px);
}

.epil-highlight p {
    font-size: 17px;
}

.epil-highlight__note {
    margin-bottom: 0;
    font-size: 14px !important;
    opacity: .85;
}

/* FAQ */
.epil-faq details {
    border-bottom: 1px solid var(--ea-line);
}

.epil-faq summary {
    position: relative;
    padding: 16px 36px 16px 0;
    font-family: var(--epil-font-heading, inherit);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

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

.epil-faq summary::after {
    content: "+";
    position: absolute;
    top: 12px;
    right: 4px;
    color: #c55fe6;
    font-size: 24px;
    line-height: 1;
}

.epil-faq details[open] summary::after {
    content: "–";
}

.epil-faq details p {
    margin: 0 0 16px;
    color: var(--ea-text);
}

/* CTA */
.epil-cta {
    margin: 48px 0 16px;
    padding: 26px 28px;
    border: 2px solid #e898f7;
    border-radius: 20px;
    background: #fdf7fe;
}

.epil-cta__text {
    font-size: 18px;
    font-weight: 600;
}

.epil-article .epil-cta__contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.epil-cta__contacts li {
    margin: 0;
    padding: 8px 14px;
    border-radius: 12px;
    background: #fff;
    font-weight: 700;
}

/* Источники */
.epil-sources {
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}

.epil-sources a {
    color: var(--ea-muted);
}

@media (max-width: 860px) {
    .epil-rating-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 18px;
    }

    .epil-rating-card__media {
        aspect-ratio: 6 / 5;
    }

    .epil-proscons,
    .epil-specs {
        grid-template-columns: 1fr;
    }

    .epil-score {
        grid-template-columns: 150px auto;
    }

    .epil-article {
        font-size: 16px;
    }
}
