/* =====================================================
   АНАЛИТИКА — шапка раздела «Аналитика» (js/analysis-hub.js)
   Тёмная обложка в одном ряду со «СВО» и «Экономикой»: заголовок, счётчики,
   главный разбор крупно. Ниже, на светлом: пометки и время чтения на карточках,
   новости, к которым есть разбор, и памятка о пометках.
   ===================================================== */

.an-hero {
    --an-bg: #060a14;
    --an-surface: rgba(255, 255, 255, 0.035);
    --an-surface-2: rgba(255, 255, 255, 0.06);
    --an-ink: #eef1fa;
    --an-muted: #a6b0c8;
    --an-faint: #74809c;
    --an-line: rgba(160, 175, 255, 0.15);
    --an-line-strong: rgba(160, 175, 255, 0.3);
    --an-accent: #9daaff;

    /* пометки «Анализ / Прогноз / Мнение» (css/pf-analytics.css) — светлые на тёмном */
    --pfa-accent: #c9d1ff;
    --pfa-forecast: #f4c35a;
    --pfa-opinion: #d3d9e6;

    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: var(--an-ink);
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.4;
    background:
        radial-gradient(ellipse 55% 85% at 92% -20%, rgba(130, 140, 255, 0.17), transparent 62%),
        radial-gradient(ellipse 70% 90% at 4% 120%, rgba(40, 110, 200, 0.16), transparent 66%),
        var(--an-bg);
}

/* Линейка, как в блокноте аналитика: тает книзу */
.an-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(160, 175, 255, 0.05) 1px, transparent 1px);
    background-size: 100% 34px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
    mask-image: linear-gradient(180deg, #000, transparent 75%);
    pointer-events: none;
}

.an-hero [hidden] { display: none !important; }

.an-wrap {
    position: relative;
    width: min(100% - 48px, 1280px);
    margin: 0 auto;
    padding: 34px 0 40px;
}

/* ---------- Рисунок на фоне ---------- */
.an-art {
    position: absolute;
    top: 8px;
    right: 0;
    z-index: -1;
    width: min(560px, 48%);
    height: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
    mask-image: linear-gradient(90deg, transparent, #000 45%);
    pointer-events: none;
}
.an-art__bars rect { fill: rgba(157, 170, 255, 0.07); }
.an-art__line { fill: none; stroke: rgba(157, 170, 255, 0.6); stroke-width: 2; stroke-linejoin: round; }
.an-art__dash { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.5; stroke-dasharray: 4 6; }
.an-art__ring { fill: none; stroke: rgba(157, 170, 255, 0.35); }
.an-art__dot { fill: var(--an-accent); }

/* ---------- Заголовок и счётчики ---------- */
.an-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px 40px;
    margin-bottom: 28px;
}

.an-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    color: var(--an-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.an-kicker__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--an-accent);
    box-shadow: 0 0 10px rgba(157, 170, 255, 0.85);
}

.an-title {
    margin: 0;
    color: #fff;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 60px;
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: 0.01em;
}

.an-lead {
    max-width: 420px;
    min-height: 1.5em;
    margin: 12px 0 0;
    color: #b9c2d8;
    font-size: 14px;
    line-height: 1.5;
}

.an-stats {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--an-line);
    border-radius: 12px;
    background: rgba(6, 10, 20, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.an-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 112px;
    padding: 12px 20px;
}
.an-stat + .an-stat { border-left: 1px solid var(--an-line); }
.an-stat b {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.an-stat span {
    color: var(--an-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- Главный разбор ---------- */
.an-feature {
    overflow: hidden;
    border: 1px solid var(--an-line);
    border-radius: 16px;
    background: var(--an-surface);
}

.an-feature__link,
.an-feature.is-loading {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    min-height: 380px;
}

.an-feature__link {
    color: inherit;
    text-decoration: none;
    transition: background 0.2s;
}
.an-feature__link:hover { background: var(--an-surface-2); }
.an-feature__link:focus-visible {
    outline: 2px solid var(--an-accent);
    outline-offset: -2px;
    border-radius: 16px;
}

.an-feature__media {
    position: relative;
    overflow: hidden;
    background: #0c1222;
}
.an-feature__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform 0.6s ease;
}
/* график или карта на обложке — целиком, на светлом */
.an-feature__media img[data-fit="contain"] {
    padding: 14px;
    object-fit: contain;
    background: #fff;
}
.an-feature__link:hover .an-feature__media img { transform: scale(1.03); }

.an-feature__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 36px 30px;
}

.an-feature__label {
    margin: 0 0 14px;
    color: var(--an-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.an-feature__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
}
.an-feature__tags:empty { display: none; }

.an-pill {
    display: inline-block;
    padding: 4px 10px 3px;
    border-radius: 999px;
    background: rgba(157, 170, 255, 0.16);
    color: #e3e7ff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.an-feature__title {
    margin: 0 0 12px;
    color: #fff;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.12;
    text-wrap: balance;
}

.an-feature__desc {
    margin: 0 0 18px;
    color: var(--an-muted);
    font-size: 15px;
    line-height: 1.6;
}

.an-feature__key {
    display: grid;
    gap: 8px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}
.an-feature__key li {
    position: relative;
    padding-left: 18px;
    color: #d6dcec;
    font-size: 14px;
    line-height: 1.5;
}
.an-feature__key li::before {
    content: "";
    position: absolute;
    top: 0.55em;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--an-accent);
}

.an-feature__meta {
    margin: auto 0 16px;
    color: var(--an-faint);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.an-feature__time::before { content: "\00a0\00b7\00a0"; }
.an-feature__time:first-child::before { content: none; }    /* без даты — без точки */

.an-feature__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #fff;
    color: #0b1020;
    font-size: 13px;
    font-weight: 700;
}
.an-feature__cta span { transition: transform 0.15s; }
.an-feature__link:hover .an-feature__cta span { transform: translateX(3px); }

.an-feature__empty {
    margin: 0;
    padding: 48px 32px;
    color: var(--an-muted);
    font-size: 15px;
    text-align: center;
}

/* Пока список не пришёл */
.an-feature.is-loading .an-feature__body { gap: 14px; justify-content: center; }
.an-feature.is-loading .an-feature__media,
.an-feature.is-loading .an-feature__body i {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 37%, rgba(255, 255, 255, 0.03) 63%);
    background-size: 400% 100%;
    animation: an-shimmer 1.4s ease infinite;
}
.an-feature.is-loading .an-feature__body i {
    display: block;
    width: 100%;
    height: 14px;
    border-radius: 4px;
}
.an-feature.is-loading .an-feature__body i:first-child { width: 40%; height: 11px; }
.an-feature.is-loading .an-feature__body i:nth-child(2) { width: 90%; height: 30px; }
.an-feature.is-loading .an-feature__body i:last-child { width: 70%; }
@keyframes an-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* =====================================================
   Светлая часть страницы
   ===================================================== */
body.page-analysis .latest-news { padding-top: 46px; padding-bottom: 36px; }

.an-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    margin: 0 0 26px;
}
.latest-news .an-list-title {
    margin: 0;
    font-size: 2rem;
}
.latest-news .an-list-title::after { bottom: -8px; width: 44px; height: 3px; }
.an-list-count { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Карточки ---------- */
.news-card.an-card { position: relative; }
.an-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
    padding: 5px 10px 4px;
    border-radius: 999px;
    background: rgba(30, 58, 138, 0.92);
    color: #fff;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.an-card__badge--forecast { background: rgba(180, 83, 9, 0.94); }
.an-card__badge--opinion { background: rgba(30, 41, 59, 0.9); }
.an-card__badge--inline {
    position: static;
    align-self: flex-start;
    margin-bottom: 10px;
    box-shadow: none;
}
.an-card__time { white-space: nowrap; }
.an-card__time::before { content: "\00a0\00b7\00a0"; }

/* ---------- Под списком ---------- */
.an-extra { padding: 0 8% 90px; }
.an-extra__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}
.an-extra__grid--single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }

.an-box {
    padding: 26px 28px 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}
.an-box__title {
    margin: 0 0 6px;
    color: var(--text-main);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.45rem;
    line-height: 1.25;
}
.an-box__sub {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.an-news__list { margin: 0; padding: 0; list-style: none; }
.an-news__item {
    display: grid;
    gap: 5px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}
.an-news__item:first-child { padding-top: 2px; border-top: 0; }
.an-news__item:last-child { padding-bottom: 0; }
.an-news__meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.an-news__title {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}
.an-news__title:hover { color: var(--accent); }
.an-news__to {
    display: block;
    color: var(--accent);
    font-size: 0.88rem;
    line-height: 1.4;
    text-decoration: none;
}
.an-news__to:hover { text-decoration: underline; }
.an-news__to-label {
    display: inline-block;
    margin-right: 8px;
    vertical-align: 1px;
    padding: 2px 7px 1px;
    border-radius: 4px;
    background: rgba(30, 58, 138, 0.08);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.an-legend__list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.an-legend__list li { display: grid; justify-items: start; gap: 6px; }
.an-legend__list p { margin: 0; color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.an-legend__more { margin: 20px 0 0; color: var(--text-muted); font-size: 0.86rem; }
.an-legend__more a { color: var(--accent); }

/* ---------- Планшет и телефон ---------- */
@media (max-width: 960px) {
    .an-feature__link,
    .an-feature.is-loading { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .an-feature__media { aspect-ratio: 16 / 9; }
    .an-feature.is-loading .an-feature__body { min-height: 220px; }
    .an-extra__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
    .an-wrap { width: calc(100% - 32px); padding: 24px 0 28px; }
    .an-art { display: none; }
    .an-title { font-size: 44px; }
    .an-head { margin-bottom: 20px; }
    .an-stats { width: 100%; }
    .an-stat { flex: 1 1 0; min-width: 0; padding: 10px 12px; }
    .an-stat b { font-size: 18px; }
    .an-feature__body { padding: 22px 20px 24px; }
    .an-feature__title { font-size: 26px; }
    .an-feature__desc { font-size: 14px; }
    body.page-analysis .latest-news { padding: 30px 16px 26px; }
    .latest-news .an-list-title { font-size: 1.6rem; }
    .an-extra { padding: 0 16px 60px; }
    .an-box { padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .an-feature__media img,
    .an-feature__cta span { transition: none; }
    .an-feature__link:hover .an-feature__media img { transform: none; }
    .an-feature.is-loading .an-feature__media,
    .an-feature.is-loading .an-feature__body i { animation: none; }
}
