/* AXIOM_HOME_HERO_FULL_V72
   Home route ONLY. Existing aligned outer rail from v7.1 is untouched.
   Row 1: daily highlight spans both columns.
   Row 2: news feed left; markets and popular right, sticky when scrolled.
   No moving DOM nodes; sources, markets, profile, RSS, article pages unmodified.
*/
@media (min-width: 1100px) {
  #app .wrap.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 minmax(0, auto) !important;
    column-gap: 18px !important;
    row-gap: 14px !important;
    align-items: start !important;
  }

  /* Full-width lead story in the first row. */
  #app .wrap.ax2-home.ax5-home > .ax2-home-columns > #axiom-digest-mount {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }
  #app .wrap.ax2-home.ax5-home > .ax2-home-columns > #axiom-digest-mount .ax3-digest {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  /* News occupy left rail below the full-width lead. */
  #app .wrap.ax2-home.ax5-home > .ax2-home-columns > .ax5-main,
  #app .wrap.ax2-home.ax5-home > .ax2-home-columns > .ax3-main {
    grid-column: 1 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  /* Markets/popular occupy right rail alongside latest news, not the lead. */
  #app .wrap.ax2-home.ax5-home > .ax2-home-columns > aside {
    grid-column: 2 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    align-self: start !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    position: sticky !important;
    top: 62px !important;
    max-height: calc(100dvh - 74px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #d8d8de transparent;
  }

  /* Give the now wider hero room, without adding another small news item. */
  #app .ax5-home #axiom-digest-mount .ax3-feature-grid:not(.ax3-feature-solo) {
    display: grid !important;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) !important;
    align-items: stretch !important;
    gap: 16px !important;
  }
  #app .ax5-home #axiom-digest-mount .ax3-feature {
    min-height: 370px !important;
  }
  #app .ax5-home #axiom-digest-mount .ax3-side-stories {
    grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
    min-height: 370px !important;
  }
  #app .ax5-home #axiom-digest-mount .ax3-feature-secondary {
    min-width: 0 !important;
  }

  #app .ax5-home .ax2-news-block > .grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 13px !important;
  }
}

@media (min-width: 1100px) and (max-width: 1249px) {
  #app .ax5-home .ax2-news-block > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #app .ax5-home #axiom-digest-mount .ax3-feature-grid:not(.ax3-feature-solo) {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) !important;
  }
}

/* Mobile and tablet continue the current stacked layout. */
@media (max-width: 1099px) {
  #app .wrap.ax2-home.ax5-home > .ax2-home-columns {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 14px !important;
  }
  #app .wrap.ax2-home.ax5-home > .ax2-home-columns > #axiom-digest-mount {
    grid-column: 1 !important; grid-row: 1 !important;
  }
  #app .wrap.ax2-home.ax5-home > .ax2-home-columns > .ax5-main,
  #app .wrap.ax2-home.ax5-home > .ax2-home-columns > .ax3-main {
    grid-column: 1 !important; grid-row: 2 !important;
  }
  #app .wrap.ax2-home.ax5-home > .ax2-home-columns > aside {
    grid-column: 1 !important; grid-row: 3 !important;
    position: static !important; max-height: none !important;
    overflow: visible !important;
  }
}
