/**
 * Home page — desktop-only Fandom-style reskin (≥1025px).
 * Pairs with chrome in desktop-fandom-chrome.css; themes follow html[data-vc-rail="light"].
 */

@media (min-width: 1025px) {
  /* Full-bleed canvas (home has no .main-content wrapper) */
  html:has(.hc-home),
  html:has(.nw-hub-shell) {
    background-color: #1a1a22 !important;
  }

  html[data-vc-rail="light"]:has(.hc-home),
  html[data-vc-rail="light"]:has(.nw-hub-shell) {
    background-color: #e8eaef !important;
  }

  body:has(.hc-home),
  body:has(.nw-hub-shell) {
    background-color: #1a1a22 !important;
  }

  html[data-vc-rail="light"] body:has(.hc-home),
  html[data-vc-rail="light"] body:has(.nw-hub-shell) {
    background-color: #e8eaef !important;
  }

  .main-content:has(.hc-home),
  .main-content:has(.nw-hub-shell) {
    background: transparent !important;
    padding: 0 !important;
  }

  .hc-home.home-page-container,
  .nw-hub-shell {
    margin-top: 0;
    padding-top: 0;
    /* Softer than pure black; edge vs rail (#000) / header reads clearly */
    --hc-bg: #1a1a22;
    --hc-bg-elev: #22222c;
    --hc-border: rgba(255, 255, 255, 0.1);
    --hc-border-strong: rgba(255, 255, 255, 0.14);
    --hc-text: rgba(255, 255, 255, 0.92);
    --hc-muted: rgba(255, 255, 255, 0.58);
    --hc-faint: rgba(255, 255, 255, 0.42);
    --hc-accent: var(--vc-peach, #ffc58e);
    --hc-accent-text: #1a0f08;
    --hc-news-date: rgba(203, 213, 225, 0.92);
    --hc-radius: 3px;
    --hc-font: "Rubik", "Inter", system-ui, -apple-system, sans-serif;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) min(300px, 26vw) !important;
    background: var(--hc-bg) !important;
    font-family: var(--hc-font);
    /* Kill legacy min-height: 100vh from home.css — avoids odd band above footer */
    min-height: 0 !important;
    box-sizing: border-box;
  }

  .hc-home.home-page-container {
    gap: clamp(16px, 1.4vw, 24px) !important;
    align-items: start;
    padding-bottom: clamp(36px, 4vw, 56px);
  }

  /* Hub pages: hero + wiki rail one band — no gutter, rail stretches to footer */
  .nw-hub-shell {
    grid-template-columns: minmax(0, 1fr) min(300px, 28vw) !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
    align-items: stretch;
    padding-bottom: 0;
  }

  .nw-hub-shell > .nw-main {
    margin: 0;
    padding: 0;
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }

  html[data-vc-rail="light"] .hc-home.home-page-container,
  html[data-vc-rail="light"] .nw-hub-shell {
    --hc-bg: #e8eaef;
    --hc-bg-elev: #ffffff;
    --hc-border: rgba(15, 23, 42, 0.1);
    --hc-border-strong: rgba(15, 23, 42, 0.14);
    --hc-text: #111118;
    --hc-muted: rgba(17, 17, 24, 0.58);
    --hc-faint: rgba(17, 17, 24, 0.42);
    --hc-accent-text: #1a0f08;
    /* Date on news cards: darker than peach for contrast */
    --hc-news-date: #5c2e0a;
  }

  /* Main column: kill legacy “card deck” spacing */
  .hc-home .home-main-column.hc-main {
    padding: clamp(16px, 1.35vw, 22px) clamp(12px, 1.1vw, 20px) clamp(20px, 2vw, 36px)
      clamp(16px, 1.35vw, 22px) !important;
    gap: clamp(28px, 2.4vw, 44px) !important;
    margin: 0 !important;
    min-width: 0;
  }

  .hc-home .home-news-section.hc-section {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .hc-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: clamp(14px, 1.1vw, 20px);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hc-border);
  }

  .hc-section__title {
    margin: 0;
    font-size: clamp(17px, 1.15vw, 22px);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hc-text);
    line-height: 1.1;
  }

  .hc-section__title::before {
    display: none;
  }

  /* ── Wiki / category tiles (image + one-line label), 5 per row ── */
  .hc-tile-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(10px, 0.85vw, 14px);
  }

  /* Desktop: show exactly 5 cards per section */
  .hc-home .hc-tile-grid > .hc-wiki-tile:nth-child(n + 6) {
    display: none !important;
  }

  .hc-wiki-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: var(--hc-text);
    min-width: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .hc-wiki-tile:hover {
    opacity: 0.92;
    transform: translateY(-1px);
  }

  .hc-wiki-tile:focus-visible {
    outline: 2px solid rgba(129, 140, 248, 0.9);
    outline-offset: 3px;
    border-radius: var(--hc-radius);
  }

  .hc-wiki-tile__media {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--hc-radius);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--hc-border);
  }

  html[data-vc-rail="light"] .hc-wiki-tile__media {
    background: #dfe3ea;
  }

  .hc-wiki-tile__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .hc-wiki-tile__label {
    font-size: clamp(13px, 0.95vw, 16px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ── News grid (editorial rows) — home + hub ── */
  .hc-news-grid,
  .nw-hub-shell .nw-news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 1.15vw, 20px);
  }

  .nw-hub-shell .nw-news-grid {
    gap: clamp(10px, 0.85vw, 14px);
  }

  /* Mini feed cards (wiki-rec-news-card look), 4 per row — pages 2+ or tail of page 1 */
  .nw-hub-shell .nw-feed-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 0.85vw, 14px);
    margin-top: clamp(10px, 0.85vw, 14px);
    --wr-text: var(--hc-text);
    --wr-muted: var(--hc-muted);
  }

  /* Те же hc-news-card, что в сетке выше, но в узкой 4-колоночной полосе — колонка + превью сверху (как бывшие mini) */
  .nw-hub-shell .nw-feed-mini-grid .hc-news-card {
    flex-direction: column;
    align-items: stretch;
  }

  .nw-hub-shell .nw-feed-mini-grid .hc-news-card__thumb {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--hc-border);
  }

  .nw-hub-shell .nw-feed-mini-grid .hc-news-card__thumb::after {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(129, 140, 248, 0.85) 0%, rgba(79, 70, 229, 0.45) 100%);
  }

  .hc-news-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    background: var(--hc-bg-elev);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  }

  html[data-vc-rail="light"] .hc-news-card {
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  }

  .hc-news-card:hover {
    border-color: var(--hc-border-strong);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  }

  html[data-vc-rail="light"] .hc-news-card:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  }

  .hc-news-card:focus-visible {
    outline: 2px solid rgba(129, 140, 248, 0.85);
    outline-offset: 2px;
  }

  .hc-news-card__thumb {
    flex: 0 0 clamp(200px, 42%, 320px);
    position: relative;
    background: #0c0c12;
    border-right: 1px solid var(--hc-border);
  }

  html[data-vc-rail="light"] .hc-news-card__thumb {
    background: #d8dce4;
  }

  .hc-news-card__thumb::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, rgba(129, 140, 248, 0.85) 0%, rgba(79, 70, 229, 0.45) 100%);
    opacity: 1;
  }

  .hc-news-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 136px;
  }

  .hc-news-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: clamp(10px, 0.9vw, 14px) clamp(12px, 1vw, 16px);
    gap: 5px;
  }

  .hc-news-card__date {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--hc-news-date);
    line-height: 1.3;
    text-transform: none;
  }

  .hc-news-card__title {
    margin: 0;
    font-family: var(--hc-font, "Rubik", "Inter", system-ui, -apple-system, sans-serif);
    font-size: clamp(15px, 1vw, 18px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--hc-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hc-news-card__excerpt {
    margin: 0;
    flex: 1;
    font-size: clamp(12px, 0.78vw, 14px);
    line-height: 1.45;
    color: var(--hc-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hc-news-card__meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 12px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--hc-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--hc-muted);
  }

  .hc-news-card__engagement {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 4px;
    flex: 1;
    min-width: 0;
  }

  .hc-eng {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--hc-muted);
    letter-spacing: 0.02em;
  }

  .hc-eng i {
    font-size: 12px;
    opacity: 0.88;
    color: var(--hc-text);
  }

  html[data-vc-rail="light"] .hc-eng i {
    color: #374151;
  }

  .hc-news-card__cta {
    flex-shrink: 0;
    align-self: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    color: #f8fafc;
    background: rgba(99, 102, 241, 0.55);
    padding: 5px 12px;
    border-radius: var(--hc-radius);
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: background 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  }

  html[data-vc-rail="light"] .hc-news-card__cta {
    color: #f8fafc;
    background: #4f46e5;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  }

  .hc-news-card:hover .hc-news-card__cta {
    background: rgba(129, 140, 248, 0.75);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  }

  html[data-vc-rail="light"] .hc-news-card:hover .hc-news-card__cta {
    background: #4338ca;
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.35);
  }

  /* ── Right column: large type, neutral / violet accents (no peach wash) ── */
  .hc-home .home-sidebar.hc-sidebar.hc-rail-col {
    display: flex !important;
    flex-direction: column !important;
    gap: clamp(16px, 1.25vw, 22px) !important;
    position: relative !important;
    top: auto !important;
    align-self: start !important;
    margin: clamp(16px, 1.35vw, 22px) clamp(12px, 1vw, 18px) 0 0 !important;
    max-height: none !important;
    overflow: visible !important;
    min-width: 0;
  }

  .hc-rail-card {
    border: 1px solid var(--hc-border);
    border-radius: 4px;
    background: var(--hc-bg-elev);
    padding: 16px 16px 14px;
    box-sizing: border-box;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2);
  }

  html[data-vc-rail="light"] .hc-rail-card {
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
  }

  .hc-rail-card__title {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hc-border);
    font-size: clamp(16px, 1.12vw, 19px);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--hc-text);
    line-height: 1.2;
  }

  .hc-rail-card--links .hc-rail-card__title {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  /* Leaderboard */
  .hc-rail-leader {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hc-rail-leader__item {
    margin: 0;
    padding: 0;
  }

  .hc-rail-leader__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
    border: 1px solid var(--hc-border);
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.15s ease, background 0.15s ease;
  }

  html[data-vc-rail="light"] .hc-rail-leader__link {
    background: #f9fafb;
  }

  .hc-rail-leader__link:hover {
    border-color: rgba(129, 140, 248, 0.45);
    background: rgba(129, 140, 248, 0.08);
  }

  html[data-vc-rail="light"] .hc-rail-leader__link:hover {
    background: #f3f4f6;
    border-color: rgba(67, 56, 202, 0.2);
  }

  .hc-rail-leader__link--top {
    border-color: rgba(129, 140, 248, 0.4);
    background: rgba(99, 102, 241, 0.1);
  }

  html[data-vc-rail="light"] .hc-rail-leader__link--top {
    background: linear-gradient(135deg, #eef2ff 0%, #f9fafb 100%);
    border-color: rgba(99, 102, 241, 0.25);
  }

  .hc-rail-leader__rank {
    flex: 0 0 28px;
    font-size: 14px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: var(--hc-muted);
    line-height: 1;
  }

  .hc-rail-leader__link--top .hc-rail-leader__rank {
    color: #a5b4fc;
  }

  html[data-vc-rail="light"] .hc-rail-leader__link--top .hc-rail-leader__rank {
    color: #4f46e5;
  }

  .hc-rail-leader__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--hc-border);
    flex-shrink: 0;
    display: block;
  }

  .hc-rail-leader__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .hc-rail-leader__name {
    font-size: 14px;
    font-weight: 800;
    color: var(--hc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hc-rail-leader__xp {
    font-size: 12px;
    font-weight: 600;
    color: var(--hc-muted);
    letter-spacing: 0.02em;
  }

  /* Site totals */
  .hc-rail-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .hc-rail-stats__triple {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hc-rail-stat {
    padding: 12px 10px;
    border-radius: 4px;
    border: 1px solid var(--hc-border);
    background: rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    min-width: 0;
  }

  html[data-vc-rail="light"] .hc-rail-stat {
    background: #fff;
  }

  .hc-rail-stat__value {
    font-size: clamp(17px, 1.25vw, 22px);
    font-weight: 900;
    line-height: 1;
    color: var(--hc-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
  }

  .hc-rail-stat__label {
    font-size: 11px;
    font-weight: 700;
    color: var(--hc-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1.2;
  }

  .hc-rail-stats__pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hc-rail-stat--wide {
    padding: 14px 12px;
    gap: 10px;
  }

  .hc-rail-stat--wide .hc-rail-stat__value {
    font-size: clamp(18px, 1.35vw, 24px);
  }

  /* Shortcuts */
  .hc-rail-links {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .hc-rail-links__a {
    display: block;
    padding: 13px 2px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--hc-text);
    text-decoration: none;
    border-bottom: 1px solid var(--hc-border);
    transition: color 0.12s ease, padding-left 0.12s ease;
  }

  .hc-rail-links__a:last-child {
    border-bottom: none;
    padding-bottom: 2px;
  }

  .hc-rail-links__a:hover {
    color: #a5b4fc;
    padding-left: 4px;
  }

  html[data-vc-rail="light"] .hc-rail-links__a:hover {
    color: #4338ca;
  }

  /* Hero / bento (desktop home): calmer chrome, round-CTA, less neon */
  .hc-home .home-top-showcase {
    border-bottom: 1px solid var(--hc-border);
    border-radius: 0;
    overflow: hidden;
  }

  .hc-home .home-top-showcase__main-card::after,
  .hc-home .home-top-showcase__small-card::after {
    background: linear-gradient(to top, rgba(6, 8, 18, 0.88) 0%, rgba(6, 8, 18, 0.4) 48%, rgba(6, 8, 18, 0.08) 100%);
  }

  .hc-home .home-top-showcase__title {
    letter-spacing: -0.02em;
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
  }

  .hc-home .home-top-showcase__subtitle {
    max-width: 34em;
    color: rgba(248, 250, 252, 0.88);
  }

  .hc-home .home-top-showcase__link {
    margin-top: 2px;
    font-size: clamp(12px, 0.85vw, 14px);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: none;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    padding: 0.45em 1.15em 0.45em 1.05em;
    gap: 0.45em;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    background-image: none;
  }

  .hc-home .home-top-showcase__link i {
    font-size: 0.85em;
    opacity: 0.9;
  }

  .hc-home .home-top-showcase__main-card:hover .home-top-showcase__link {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.52);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
  }

  .hc-home .home-top-showcase__top-badge {
    color: #f1f5f9;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: clamp(10px, 0.62vw, 11px);
  }

  /* Hub wiki rail: в разметке до 6 плиток (мобилка); на десктопе по-прежнему видно 4 */
  .nw-hub-shell .wiki-rec-tiles--hub-four .wiki-rec-tile:nth-child(n + 5) {
    display: none !important;
  }

  /* Footer: remove large margin so gap isn’t a third colour (chrome sets margin-top on .vc-footer) */
  body:has(.hc-home) .main-footer.vc-footer {
    margin-top: 0 !important;
  }
}

/* Hub mini news cards — column layout + engagement row (all viewports; mini grid columns from breakpoints above) */
.nw-hub-shell .nw-feed-mini-card.wiki-rec-news-card {
  display: flex;
  flex-direction: column;
}

.nw-hub-shell .nw-feed-mini-card .wiki-rec-news-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.nw-hub-shell .nw-feed-mini-card .wiki-rec-news-card__excerpt {
  flex: 1;
  min-height: 0;
}

.nw-hub-shell .nw-feed-mini-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--hc-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--hc-muted);
}

.nw-hub-shell .nw-feed-mini-card__engagement {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  flex: 1;
  min-width: 0;
  transform: translateY(-1px);
}

.nw-hub-shell .nw-feed-mini-card__engagement .hc-eng {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--hc-muted);
  letter-spacing: 0.02em;
}

.nw-hub-shell .nw-feed-mini-card__engagement .hc-eng i {
  font-size: 12px;
  opacity: 0.88;
  color: var(--hc-text);
}

html[data-vc-rail="light"] .nw-hub-shell .nw-feed-mini-card__engagement .hc-eng i {
  color: #374151;
}

.nw-hub-shell .nw-feed-mini-card__cta {
  flex-shrink: 0;
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #f8fafc;
  background: rgba(99, 102, 241, 0.55);
  padding: 5px 11px;
  border-radius: var(--hc-radius, 3px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

html[data-vc-rail="light"] .nw-hub-shell .nw-feed-mini-card__cta {
  background: #4f46e5;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

.nw-hub-shell .nw-feed-mini-card.wiki-rec-news-card:hover .nw-feed-mini-card__cta {
  background: rgba(129, 140, 248, 0.75);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

html[data-vc-rail="light"] .nw-hub-shell .nw-feed-mini-card.wiki-rec-news-card:hover .nw-feed-mini-card__cta {
  background: #4338ca;
  box-shadow: 0 2px 8px rgba(67, 56, 202, 0.35);
}

/* hc-news editorial cards — below desktop chrome (home + newswire share same markup) */
@media (max-width: 1024px) {
  .hc-home.home-page-container,
  .nw-hub-shell {
    --hc-font: "Rubik", "Inter", system-ui, -apple-system, sans-serif;
    --hc-text: rgba(255, 255, 255, 0.92);
    --hc-muted: rgba(255, 255, 255, 0.58);
    --hc-news-date: rgba(203, 213, 225, 0.92);
    --hc-bg-elev: #22222c;
    --hc-border: rgba(255, 255, 255, 0.1);
    --hc-border-strong: rgba(255, 255, 255, 0.14);
    --hc-radius: 3px;
    font-family: var(--hc-font);
  }

  html[data-vc-rail="light"] .hc-home.home-page-container,
  html[data-vc-rail="light"] .nw-hub-shell {
    --hc-text: #111118;
    --hc-muted: rgba(17, 17, 24, 0.58);
    --hc-news-date: #5c2e0a;
    --hc-bg-elev: #ffffff;
    --hc-border: rgba(15, 23, 42, 0.1);
    --hc-border-strong: rgba(15, 23, 42, 0.14);
  }

  .hc-home .hc-news-grid,
  .nw-hub-shell .nw-news-grid.hc-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .nw-hub-shell .nw-feed-mini-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
    margin-top: 11px;
    --wr-text: var(--hc-text);
    --wr-muted: var(--hc-muted);
  }

  @media (min-width: 520px) and (max-width: 1024px) {
    .nw-hub-shell .nw-feed-mini-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  .nw-hub-shell .nw-feed-mini-grid .wiki-rec-news-card__body {
    padding: 8px 10px 10px;
  }

  .nw-hub-shell .nw-feed-mini-grid .wiki-rec-news-card__title {
    font-family: var(--hc-font, "Rubik", "Inter", system-ui, -apple-system, sans-serif);
    font-size: 15px;
  }

  .hc-home .hc-news-card,
  .nw-hub-shell .hc-news-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    background: var(--hc-bg-elev);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  html[data-vc-rail="light"] .hc-home .hc-news-card,
  html[data-vc-rail="light"] .nw-hub-shell .hc-news-card {
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  }

  .hc-home .hc-news-card__thumb,
  .nw-hub-shell .hc-news-card__thumb {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    background: #0c0c12;
    border-right: none;
    border-bottom: 1px solid var(--hc-border);
  }

  html[data-vc-rail="light"] .hc-home .hc-news-card__thumb,
  html[data-vc-rail="light"] .nw-hub-shell .hc-news-card__thumb {
    background: #d8dce4;
  }

  .hc-home .hc-news-card__thumb::after,
  .nw-hub-shell .hc-news-card__thumb::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(129, 140, 248, 0.85) 0%, rgba(79, 70, 229, 0.45) 100%);
  }

  .hc-home .hc-news-card__thumb img,
  .nw-hub-shell .hc-news-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 0;
  }

  .hc-home .hc-news-card__body,
  .nw-hub-shell .hc-news-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 14px 14px;
    gap: 5px;
  }

  .hc-home .hc-news-card__date,
  .nw-hub-shell .hc-news-card__date {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--hc-news-date);
  }

  .hc-home .hc-news-card__title,
  .nw-hub-shell .hc-news-card__title {
    margin: 0;
    font-family: var(--hc-font, "Rubik", "Inter", system-ui, -apple-system, sans-serif);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--hc-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hc-home .hc-news-card__excerpt,
  .nw-hub-shell .hc-news-card__excerpt {
    margin: 0;
    flex: 1;
    font-size: 13px;
    line-height: 1.45;
    color: var(--hc-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hc-home .hc-news-card__meta,
  .nw-hub-shell .hc-news-card__meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 12px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--hc-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--hc-muted);
  }

  .hc-home .hc-news-card__engagement,
  .nw-hub-shell .hc-news-card__engagement {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    flex: 1;
    min-width: 0;
  }

  .hc-home .hc-eng,
  .nw-hub-shell .hc-eng {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--hc-muted);
  }

  .hc-home .hc-eng i,
  .nw-hub-shell .hc-eng i {
    font-size: 12px;
    opacity: 0.88;
    color: var(--hc-text);
  }

  html[data-vc-rail="light"] .hc-home .hc-eng i,
  html[data-vc-rail="light"] .nw-hub-shell .hc-eng i {
    color: #374151;
  }

  .hc-home .hc-news-card__cta,
  .nw-hub-shell .hc-news-card__cta {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f8fafc;
    background: rgba(99, 102, 241, 0.55);
    padding: 5px 12px;
    border-radius: var(--hc-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  }

  html[data-vc-rail="light"] .hc-home .hc-news-card__cta,
  html[data-vc-rail="light"] .nw-hub-shell .hc-news-card__cta {
    background: #4f46e5;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  }

  /* Wiki tiles (same as desktop strip): grid was only inside ≥1025px block — restore for tablet/phone */
  .hc-home .hc-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 0.85vw, 14px);
  }

  @media (min-width: 520px) and (max-width: 1024px) {
    .hc-home .hc-tile-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  .hc-home .hc-wiki-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: var(--hc-text);
    min-width: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .hc-home .hc-wiki-tile:hover {
    opacity: 0.92;
    transform: translateY(-1px);
  }

  .hc-home .hc-wiki-tile__media {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--hc-radius);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--hc-border);
  }

  html[data-vc-rail="light"] .hc-home .hc-wiki-tile__media {
    background: #dfe3ea;
  }

  .hc-home .hc-wiki-tile__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .hc-home .hc-wiki-tile__label {
    font-size: clamp(13px, 0.95vw, 16px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hub (exploration / category / …): те же вики-плитки и сетка, что на home (.hc-home) */
  .nw-hub-shell .hc-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 0.85vw, 14px);
  }

  @media (min-width: 520px) and (max-width: 1024px) {
    .nw-hub-shell .hc-tile-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  .nw-hub-shell .hc-wiki-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: var(--hc-text);
    min-width: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .nw-hub-shell .hc-wiki-tile:hover {
    opacity: 0.92;
    transform: translateY(-1px);
  }

  .nw-hub-shell .hc-wiki-tile__media {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--hc-radius);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--hc-border);
  }

  html[data-vc-rail="light"] .nw-hub-shell .hc-wiki-tile__media {
    background: #dfe3ea;
  }

  .nw-hub-shell .hc-wiki-tile__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .nw-hub-shell .hc-wiki-tile__label {
    font-size: clamp(13px, 0.95vw, 16px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--hc-font, "Rubik", "Inter", system-ui, sans-serif);
  }

  body:has(.nw-hub-shell) .main-footer.vc-footer {
    margin-top: 0 !important;
  }
}

/* Телефон: описание в новостной карточке — 2 строки (как на home mobile) */
@media (max-width: 640px) {
  .hc-home .hc-news-card__excerpt,
  .nw-hub-shell .hc-news-card__excerpt {
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }
}
