/* ============================================================
   Листинг контентных страниц (#2.5) — подборка статей. Токены/компонент-слой
   ДС — глобально (/ds/*.css). Портировано из design-reference ArticleListing,
   консолидировано до видов «плитки» (grid) и «список» (list).
   ============================================================ */

.al { padding-top: 14px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 22px; }

/* плейсхолдер медиа */
.lst-ph { position: relative; height: 140px; border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center;
  background:
    radial-gradient(120% 100% at 82% -14%, color-mix(in srgb, var(--c) 56%, #fff 8%), transparent 56%),
    linear-gradient(155deg, color-mix(in srgb, var(--c) 92%, #000 5%), color-mix(in srgb, var(--c) 52%, var(--brand-plum) 60%)); }
.lst-ph__ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,0.2); }
.lst-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: var(--fw-bold); color: #fff; padding: 4px 9px; border-radius: var(--r-pill); backdrop-filter: blur(2px); }
.lst-badge svg { width: 11px; height: 11px; }
.lst-badge--new { background: rgba(47,127,224,0.92); }
.lst-badge--hot { background: rgba(232,92,151,0.92); }
.lst-badge--editor { background: rgba(58,42,94,0.82); }

/* 01 header */
.lst-head__crumbs { margin-bottom: 12px; }
.lst-eyebrow { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; font-weight: var(--fw-bold); color: var(--primary); }
.lst-eyebrow svg { width: 13px; height: 13px; }
.lst-head__title { margin: 10px 0 0; }
.lst-head__intro { margin: 10px 0 0; font-size: var(--fs-body); line-height: 1.6; color: var(--fg-2); }

/* 02 collections */
.lst-cols { margin: 0 calc(-1 * var(--gutter)); }
.lst-col { width: 158px; flex: none; display: flex; flex-direction: column; gap: 7px; padding: 16px; border-radius: var(--r-lg); text-align: left; color: #fff; border: none; cursor: pointer; font-family: inherit;
  background:
    radial-gradient(120% 100% at 84% -16%, color-mix(in srgb, var(--c) 58%, #fff 8%), transparent 56%),
    linear-gradient(150deg, color-mix(in srgb, var(--c) 92%, #000 4%), color-mix(in srgb, var(--c) 54%, var(--brand-plum) 58%)); }
.lst-col:first-child { margin-left: var(--gutter); }
.lst-col:active { transform: scale(0.98); }
.lst-col__ic { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,0.2); display: grid; place-items: center; }
.lst-col__title { font-size: var(--fs-body); font-weight: var(--fw-extra); line-height: 1.2; }
.lst-col__count { font-size: var(--fs-xs); color: rgba(255,255,255,0.88); font-weight: var(--fw-semibold); }

/* 03 filter */
.lst-filter { display: flex; flex-direction: column; gap: 12px; }
.lst-search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border-2); box-shadow: var(--shadow-sm); color: var(--fg-3); }
.lst-search svg { flex: none; width: 18px; height: 18px; color: var(--fg-3); }
.lst-search input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; font-family: inherit; font-size: var(--fs-body); color: var(--fg); }
.lst-search input::placeholder { color: var(--fg-3); }
.lst-cats { margin: 0 calc(-1 * var(--gutter)); }
.lst-cats .chip:first-child { margin-left: var(--gutter); }
.lst-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lst-count { font-size: var(--fs-sm); color: var(--fg-2); }
.lst-count b { color: var(--fg); font-weight: var(--fw-extra); }
.lst-sort button { font-size: var(--fs-xs); padding: 6px 12px; }
.lst-views { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); }
.lst-views button { display: inline-flex; align-items: center; gap: 5px; border: none; background: none; padding: 6px 12px; border-radius: var(--r-pill); font-family: inherit; font-weight: var(--fw-semibold); font-size: var(--fs-xs); color: var(--fg-2); cursor: pointer; }
.lst-views button.is-active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
.lst-views button svg { width: 14px; height: 14px; }

/* 04 featured — классы сниппетов scoped под .al (избегаем коллизии с listing.css F7) */
.lst-featured__kicker { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: var(--fw-extra); text-transform: uppercase; letter-spacing: .04em; color: var(--rose); margin-bottom: 8px; }
.lst-featured__kicker svg { width: 13px; height: 13px; }
.al .snip-feat { position: relative; min-height: 230px; border-radius: var(--r-lg); overflow: hidden; padding: 18px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--shadow-md);
  background:
    radial-gradient(120% 90% at 84% -14%, color-mix(in srgb, var(--c) 58%, #fff 8%), transparent 56%),
    linear-gradient(150deg, color-mix(in srgb, var(--c) 92%, #000 5%), color-mix(in srgb, var(--c) 50%, var(--brand-plum) 62%)); }
.al .snip-feat__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(20,10,30,0.55) 100%); }
.al .snip-feat__ic { position: absolute; top: 16px; left: 16px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,0.2); }
.al .snip-feat__body { position: relative; z-index: 1; }
.al .snip-feat__cat { font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .04em; opacity: .9; }
.al .snip-feat__title { margin: 6px 0 6px; font-size: var(--fs-h2); font-weight: var(--fw-extra); line-height: 1.18; letter-spacing: -0.01em; }
.al .snip-feat__desc { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: rgba(255,255,255,0.9); max-width: 42ch; }
.al .snip-feat__meta { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: rgba(255,255,255,0.92); }
.al .snip-feat__meta svg { width: 13px; height: 13px; }

/* 04 grid + snippets */
.lst-grid { display: flex; flex-direction: column; gap: 14px; }
.lst-grid--list { gap: 4px; }
.al .snip { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast); }
.al .snip:active { transform: scale(0.99); }
.al .snip:hover { box-shadow: var(--shadow-md); }
.al .snip__body { padding: 13px 15px; display: flex; flex-direction: column; gap: 7px; }
.al .snip__cat { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--c); }
.al .snip__cat svg { width: 12px; height: 12px; }
.al .snip__title { margin: 0; font-size: var(--fs-h3); font-weight: var(--fw-extra); line-height: 1.24; letter-spacing: -0.005em; color: var(--fg); }
.al .snip__title--sm { font-size: var(--fs-body); }
.al .snip__desc { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--fg-2); }
.al .snip__desc--clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.al .snip__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--fg-3); }
.al .snip__ava { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: var(--fw-extra); color: #fff; background: linear-gradient(150deg, var(--primary), var(--rose)); }
.al .snip__author { font-weight: var(--fw-semibold); color: var(--fg-2); }
.al .snip__mi { display: inline-flex; align-items: center; gap: 3px; }
.al .snip__mi svg { width: 12px; height: 12px; }
.al .snip__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-2); }

/* компактный список */
.al .snip--list { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-md); }
.al .snip--list .snip__thumb { width: 64px; height: 56px; flex: none; }
.al .snip--list .lst-ph { height: 100%; border-radius: var(--r-sm); }
.al .snip--list .lst-ph__ic { width: 28px; height: 28px; border-radius: 8px; }
.al .snip--list .snip__body { flex: 1; min-width: 0; padding: 0; gap: 5px; }
.al .snip--list > svg { color: var(--fg-3); flex: none; width: 18px; height: 18px; }

.lst-more { margin-top: 16px; }

/* 05 seo */
.lst-seo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; }
.lst-seo__p { margin: 0 0 12px; font-size: var(--fs-sm); color: var(--fg-2); line-height: 1.6; }
.lst-seo__p:last-child { margin-bottom: 0; }
.lst-seo__rest { max-height: 0; overflow: hidden; transition: max-height var(--dur-slow) var(--ease-out); }
.lst-seo__rest.is-open { max-height: 600px; }
.lst-seo__toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; background: none; border: none; cursor: pointer; font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--primary); }
.lst-seo__toggle svg { width: 16px; height: 16px; }

/* 07 cta */
.lst-cta { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); }
.lst-cta__spark { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(150deg, var(--primary), var(--rose)); }
.lst-cta__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lst-cta__txt b { font-size: var(--fs-sm); font-weight: var(--fw-extra); color: var(--fg); }
.lst-cta__txt span { font-size: var(--fs-xs); color: var(--fg-2); line-height: 1.4; }

@media (min-width: 760px) {
  .lst-grid--grid { display: grid; grid-template-columns: 1fr 1fr; }
  .lst-head__title { font-size: var(--fs-display); }
}
