/* AXIOM_HOME_DUAL_V73 — fix for the live home on days when the digest is empty.
   v7.2 handled the digest only; on Oct 25 the live page renders the older
   .hero-slider instead. Both modes get the SAME full-width top row, with
   latest news LEFT and markets/popular RIGHT below it. No data changes. */
@media (min-width: 1100px) {
  #app .ax2-home.ax5-home > .ax2-home-columns {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(315px, 24vw, 410px) !important;
    grid-template-rows: auto auto !important;
    align-items: start !important;
    column-gap: 18px !important;
    row-gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  /* A daily digest exists: preserve its layout from v7.2. */
  #app .ax2-home.ax5-home .ax2-home-columns > #axiom-digest-mount:has(.ax2-digest,.ax3-digest) {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  /* The next day, until a new digest exists, don't reserve an empty first row. */
  #app .ax2-home.ax5-home .ax2-home-columns > #axiom-digest-mount:not(:has(.ax2-digest,.ax3-digest)) {
    display: none !important;
  }
  /* Ordinary mode: allow the real hero-slider and real news list to occupy
     independent grid cells without moving nodes or breaking its inline events. */
  #app .ax2-home.ax5-home .ax2-home-columns:not(:has(> #axiom-digest-mount .ax2-digest, > #axiom-digest-mount .ax3-digest)) > :is(.ax5-main,.ax3-main) {
    display: contents !important;
  }
  #app .ax2-home.ax5-home .ax2-home-columns:not(:has(> #axiom-digest-mount .ax2-digest, > #axiom-digest-mount .ax3-digest)) > :is(.ax5-main,.ax3-main) > .hero-slider {
    display: block !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    padding: 16px !important;
    min-width: 0 !important;
    width: 100% !important;
    background: var(--paper,#fff) !important;
    border: 1px solid var(--line,#e4e4e8) !important;
    border-radius: 11px !important;
  }
  #app .ax2-home.ax5-home .ax2-home-columns:not(:has(> #axiom-digest-mount .ax2-digest, > #axiom-digest-mount .ax3-digest)) > :is(.ax5-main,.ax3-main) > .hero-slider::before {
    content: 'Главное за сегодня';
    display: block;
    border-left: 5px solid var(--red,#c4101c);
    padding-left: 10px;
    margin: 0 0 14px;
    color: var(--ink,#14141a);
    font-size: 22px;
    font-weight: 850;
    line-height: 1.2;
  }
  /* Avoid the 16:9 natural image becoming 800px tall after widening the hero. */
  #app .ax2-home.ax5-home .ax2-home-columns > :is(.ax5-main,.ax3-main) > .hero-slider .lead > .img {
    width: 100% !important;
    height: clamp(320px, 29vw, 440px) !important;
    aspect-ratio: auto !important;
    border-radius: 7px !important;
  }
  #app .ax2-home.ax5-home .ax2-home-columns > :is(.ax5-main,.ax3-main) > .hero-slider .hero-track {
    height: auto !important;
  }
  #app .ax2-home.ax5-home .ax2-home-columns > :is(.ax5-main,.ax3-main) > .hero-slider .lead h2 {
    font-size: clamp(23px, 2.05vw, 31px) !important;
    line-height: 1.18 !important;
    margin: 12px 0 7px !important;
  }
  #app .ax2-home.ax5-home .ax2-home-columns > :is(.ax5-main,.ax3-main) > .hero-slider .lead p {
    font-size: 13px !important;
    line-height: 1.45 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  #app .ax2-home.ax5-home .ax2-home-columns:not(:has(> #axiom-digest-mount .ax2-digest, > #axiom-digest-mount .ax3-digest)) > :is(.ax5-main,.ax3-main) > #ax2-news {
    grid-column: 1 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  /* In digest mode the news block remains inside its wrapper, below the digest. */
  #app .ax2-home.ax5-home .ax2-home-columns:has(> #axiom-digest-mount .ax2-digest, > #axiom-digest-mount .ax3-digest) > :is(.ax5-main,.ax3-main) {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  /* Both modes: markets and popular start level with latest news. */
  #app .ax2-home.ax5-home .ax2-home-columns > aside {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: start !important;
    position: sticky !important;
    top: 62px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-height: calc(100dvh - 74px) !important;
    overflow-y: auto !important;
  }
}
@media (max-width: 1099px) {
  /* Previous responsive layout stays intact: digest/hero, then news, then markets. */
  #app .ax2-home.ax5-home .ax2-home-columns > aside {
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
  }
}
